<div dir="ltr"><div dir="ltr"><div>Hi All,</div><div><br></div><div>I need some help regarding SIP SUBSCRIBE message received on FreeSwitch Server.</div><div><br></div><div>Following is the Message Sequence event observed:</div><div>REGISTER ........................................(Received by FS)</div><div>401 Unauthorized ….. (Sent by FS)</div><div>REGISTER ........................................(Received by FS)</div><div>200 OK .......................(Sent by FS)</div><div>SUBSCRIBE ......................................(Received by FS)</div><div>489 Bad Event ............(Sent by FS)</div><div>PUBLISH ..........................................(Received by FS)</div><div>489 Bad Event ............(Sent by FS)</div><div>SUBSCRIBE ......................................(Received by FS)</div><div>200 OK ........................(Sent by FS)</div><div><br></div><div>In above sequence please note that message no. 5 – SIP SUBSCRIBE – and message no. 7 – SIP PUBLISH – have Content-Type as multipart/mixed.</div><div><br></div><div>For my application purpose, I need to use the info received in these messages and should respond back to client accordingly.</div><div><br></div><div>Can someone help me to point out exact places where these messages are being processed? </div><div><br></div><div>Following is the SIP Trace of transaction:</div><div><br></div><div>freeswitch@shantala-Lenovo-G50-80> recv 883 bytes from udp/[10.196.23.129]:41196 at 14:42:12.589859:</div><div>   ------------------------------------------------------------------------</div><div>   REGISTER sip:10.198.17.13 SIP/2.0</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-479585552;rport</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=461418457</div><div>   To: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;expires=1700;audio;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";+g.3gpp.cs-voice;+g.3gpp.mcptt</div><div>   Call-ID: 9b288895-6627-9abe-9d0e-cd99fdf87543</div><div>   CSeq: 160641516 REGISTER</div><div>   Content-Length: 0</div><div>   Max-Forwards: 70</div><div>   Authorization: Digest username="mcx.iitb-333.iitb",realm="10.198.17.13",nonce="",uri="sip:10.198.17.13",response=""</div><div>   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div><div>   Privacy: none</div><div>   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>   User-Agent: MCOP CLIENT MCPTT1.0 /v 0.1</div><div>   P-Preferred-Identity: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   Supported: path</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>send 668 bytes to udp/[10.196.23.129]:41196 at 14:42:12.590640:</div><div>   ------------------------------------------------------------------------</div><div>   SIP/2.0 401 Unauthorized</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-479585552;rport=41196</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=461418457</div><div>   To: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=KFNj23y3mNSmF</div><div>   Call-ID: 9b288895-6627-9abe-9d0e-cd99fdf87543</div><div>   CSeq: 160641516 REGISTER</div><div>   User-Agent: FreeSWITCH-mod_sofia/1.6.20+git~20190620T062758Z~11af54ff65~64bit</div><div>   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>   Supported: timer, path, replaces</div><div>   WWW-Authenticate: Digest realm="10.198.17.13", nonce="76ac9099-06ef-49be-b966-9c21325cf798", stale=true, algorithm=MD5, qop="auth"</div><div>   Content-Length: 0</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>recv 1029 bytes from udp/[10.196.23.129]:41196 at 14:42:12.598409:</div><div>   ------------------------------------------------------------------------</div><div>   REGISTER sip:10.198.17.13 SIP/2.0</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1467903459;rport</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=461418457</div><div>   To: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;expires=1700;audio;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";+g.3gpp.cs-voice;+g.3gpp.mcptt</div><div>   Call-ID: 9b288895-6627-9abe-9d0e-cd99fdf87543</div><div>   CSeq: 160641517 REGISTER</div><div>   Content-Length: 0</div><div>   Max-Forwards: 70</div><div>   Authorization: Digest username="mcx.iitb-333.iitb",realm="10.198.17.13",nonce="76ac9099-06ef-49be-b966-9c21325cf798",uri="sip:10.198.17.13",response="51acffef02d3a6b73c78aec6b26dcec2",algorithm=MD5,cnonce="8e1cf72f4cd5fd37a6ccbb1b821eeb94",qop=auth,nc=00000001</div><div>   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div><div>   Privacy: none</div><div>   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>   User-Agent: MCOP CLIENT MCPTT1.0 /v 0.1</div><div>   P-Preferred-Identity: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   Supported: path</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>send 645 bytes to udp/[10.196.23.129]:41196 at 14:42:12.600354:</div><div>   ------------------------------------------------------------------------</div><div>   SIP/2.0 200 OK</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1467903459;rport=41196</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=461418457</div><div>   To: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=mreB4yF7HyF7a</div><div>   Call-ID: 9b288895-6627-9abe-9d0e-cd99fdf87543</div><div>   CSeq: 160641517 REGISTER</div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;expires=1700</div><div>   Date: Mon, 01 Jul 2019 09:12:12 GMT</div><div>   User-Agent: FreeSWITCH-mod_sofia/1.6.20+git~20190620T062758Z~11af54ff65~64bit</div><div>   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>   Supported: timer, path, replaces</div><div>   Content-Length: 0</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>recv 1767 bytes from udp/[10.196.23.129]:41196 at 14:42:12.682238:</div><div>   ------------------------------------------------------------------------</div><div>   SUBSCRIBE sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a> SIP/2.0</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1600282236;rport</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=695831546</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>></div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";+g.3gpp.mcptt</div><div>   Call-ID: 22b6445e-982e-3034-6046-93ac75341206</div><div>   CSeq: 401808965 SUBSCRIBE</div><div>   Expires: 3600</div><div>   Content-Type: multipart/mixed;boundary=66f2554f-ba0c-fcf8-f9df-6c5375345642</div><div>   Content-Length: 808</div><div>   Max-Forwards: 70</div><div>   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div><div>   Privacy: none</div><div>   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>   User-Agent: MCOP CLIENT MCPTT1.0 /v 0.1</div><div>   P-Preferred-Identity: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mcptt</div><div>   Accept: application/xcap-diff+xml</div><div>   Event: xcap-diff</div><div>   </div><div>   --66f2554f-ba0c-fcf8-f9df-6c5375345642</div><div>   Content-Type: application/vnd.3gpp.mcptt-info+xml</div><div>   </div><div>   <mcpttinfo xmlns="urn:3gpp:ns:mcpttInfo:1.0"></div><div>      <mcptt-Params></div><div>         <mcptt-client-id type="Normal"></div><div>            <mcpttString><a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a></mcpttString></div><div>         </mcptt-client-id></div><div>         <mcptt-request-uri type="Normal"></div><div>            <mcpttURI><a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a></mcpttURI></div><div>         </mcptt-request-uri></div><div>      </mcptt-Params></div><div>   </mcpttinfo></div><div>   --66f2554f-ba0c-fcf8-f9df-6c5375345642</div><div>   Content-Type: application/resource-lists+xml</div><div>   </div><div>   <resource-lists xmlns="urn:ietf:params:xml:ns:resource-lists" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"></div><div>      <list></div><div>         <entry uri="org.3gpp.mcptt.ue-config/users/mcptt_UE_id/"/></div><div>      </list></div><div>   </resource-lists></div><div>   --66f2554f-ba0c-fcf8-f9df-6c5375345642--</div><div>   ------------------------------------------------------------------------</div><div>send 715 bytes to udp/[10.196.23.129]:41196 at 14:42:12.682421:</div><div>   ------------------------------------------------------------------------</div><div>   SIP/2.0 489 Bad Event</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1600282236;rport=41196</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=695831546</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>>;tag=N1735S0aF75Sp</div><div>   Call-ID: 22b6445e-982e-3034-6046-93ac75341206</div><div>   CSeq: 401808965 SUBSCRIBE</div><div>   User-Agent: FreeSWITCH-mod_sofia/1.6.20+git~20190620T062758Z~11af54ff65~64bit</div><div>   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>   Supported: timer, path, replaces</div><div>   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>   Content-Length: 0</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>recv 1746 bytes from udp/[10.196.23.129]:41196 at 14:42:12.724245:</div><div>   ------------------------------------------------------------------------</div><div>   PUBLISH sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a> SIP/2.0</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1262365214;rport</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=572479811</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>></div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";+g.3gpp.mcptt</div><div>   Call-ID: 44efbb6c-0cb8-bcb9-eda8-34e6fe929c0c</div><div>   CSeq: 460922957 PUBLISH</div><div>   Expires: 4294967295</div><div>   Content-Type: multipart/mixed;boundary=ee899bdf-2023-5552-60d6-aa7ed89cc134</div><div>   Content-Length: 817</div><div>   Max-Forwards: 70</div><div>   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div><div>   Privacy: none</div><div>   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>   User-Agent: MCOP CLIENT MCPTT1.0 /v 0.1</div><div>   P-Preferred-Identity: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mcptt</div><div>   Event: poc-settings</div><div>   </div><div>   --ee899bdf-2023-5552-60d6-aa7ed89cc134</div><div>   Content-Type: application/vnd.3gpp.mcptt-info+xml</div><div>   </div><div>   <mcpttinfo xmlns="urn:3gpp:ns:mcpttInfo:1.0"></div><div>      <mcptt-Params></div><div>         <mcptt-client-id type="Normal"></div><div>            <mcpttString><a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a></mcpttString></div><div>         </mcptt-client-id></div><div>         <mcptt-request-uri type="Normal"></div><div>            <mcpttURI><a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a></mcpttURI></div><div>         </mcptt-request-uri></div><div>      </mcptt-Params></div><div>   </mcpttinfo></div><div>   --ee899bdf-2023-5552-60d6-aa7ed89cc134</div><div>   Content-Type: application/poc-settings+xml</div><div>   </div><div>   <poc-settings xmlns="urn:oma:params:xml:ns:poc:poc-settings"></div><div>      <entity id="564ccb95-66a2-4443-bc80-cfc59e28d2bc"></div><div>         <am-settings></div><div>            <answer-mode>automatic</answer-mode></div><div>         </am-settings></div><div>      </entity></div><div>   </poc-settings></div><div>   --ee899bdf-2023-5552-60d6-aa7ed89cc134--</div><div>   ------------------------------------------------------------------------</div><div>send 713 bytes to udp/[10.196.23.129]:41196 at 14:42:12.724421:</div><div>   ------------------------------------------------------------------------</div><div>   SIP/2.0 489 Bad Event</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1262365214;rport=41196</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=572479811</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>>;tag=pa1v7mHecgvcj</div><div>   Call-ID: 44efbb6c-0cb8-bcb9-eda8-34e6fe929c0c</div><div>   CSeq: 460922957 PUBLISH</div><div>   User-Agent: FreeSWITCH-mod_sofia/1.6.20+git~20190620T062758Z~11af54ff65~64bit</div><div>   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>   Supported: timer, path, replaces</div><div>   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>   Content-Length: 0</div><div>   </div><div>   ------------------------------------------------------------------------</div><div>recv 1232 bytes from udp/[10.196.23.129]:41196 at 14:42:17.731697:</div><div>   ------------------------------------------------------------------------</div><div>   SUBSCRIBE sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a> SIP/2.0</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1771073717;rport</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=923465290</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>></div><div>   Contact: <sip:mcx.iitb-333.iitb@10.196.23.129:41196;transport=udp>;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-service.ims.icsi.mcptt";+g.3gpp.mcptt</div><div>   Call-ID: b9de154c-daaa-800c-a993-ee1ec11dcbbe</div><div>   CSeq: 2013176009 SUBSCRIBE</div><div>   Expires: 4294967295</div><div>   Content-Type: application/vnd.3gpp.mcptt-info+xml</div><div>   Content-Length: 298</div><div>   Max-Forwards: 70</div><div>   Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER</div><div>   Privacy: none</div><div>   P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000</div><div>   User-Agent: MCOP CLIENT MCPTT1.0 /v 0.1</div><div>   P-Preferred-Identity: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>></div><div>   P-Preferred-Service: urn:urn-7:3gpp-service.ims.icsi.mcptt</div><div>   Accept: application/pidf+xml</div><div>   Event: presence</div><div>   </div><div>   <?xml version="1.0" encoding="UTF-8"?></div><div>   <mcpttinfo xmlns="urn:3gpp:ns:mcpttInfo:1.0" xmlns:xsi="<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>"></div><div>   <mcptt-Params></div><div>   <mcptt-request-uri type="Normal"><mcpttURI><a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a></mcpttURI></mcptt-request-uri></div><div>   </mcptt-Params></div><div>   </mcpttinfo></div><div>   ------------------------------------------------------------------------</div><div>send 811 bytes to udp/[10.196.23.129]:41196 at 14:42:17.744414:</div><div>   ------------------------------------------------------------------------</div><div>   SIP/2.0 200 OK</div><div>   Via: SIP/2.0/UDP 10.196.23.129:41196;branch=z9hG4bK-1771073717;rport=41196</div><div>   From: <<a href="mailto:sip%3Amcx.iitb-333.iitb@10.198.17.13">sip:mcx.iitb-333.iitb@10.198.17.13</a>>;tag=923465290</div><div>   To: <sip:<a href="http://mcptt-server-orig-part.organization.org">mcptt-server-orig-part.organization.org</a>>;tag=my0OZqHdfUzH</div><div>   Call-ID: b9de154c-daaa-800c-a993-ee1ec11dcbbe</div><div>   CSeq: 2013176009 SUBSCRIBE</div><div>   Contact: <<a href="http://sip:@10.198.17.13:5060">sip:@10.198.17.13:5060</a>></div><div>   Expires: 4294967295</div><div>   User-Agent: FreeSWITCH-mod_sofia/1.6.20+git~20190620T062758Z~11af54ff65~64bit</div><div>   Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE</div><div>   Supported: timer, path, replaces</div><div>   Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, line-seize, call-info, sla, include-session-description, presence.winfo, message-summary, refer</div><div>   Subscription-State: active;expires=4294967295</div><div>   Content-Length: 0</div><div>  </div><div>   </div><div><br></div><div>P.S.: interestingly enough, last SIP SUBSCRIBE message – message #9 – is being processed by sofia_process_dispatch_event(). The previous messages are not.</div><div><br></div><div>Thanks</div><div>Akshay Patil</div><div><br></div><div><div dir="ltr" class="gmail_signature"><div>--</div>Akshay Patil<div>e-mail : <a href="mailto:ahvpatil@gmail.com" target="_blank">ahvpatil@gmail.com</a></div><div>Mob. No. : +91-9930166672</div></div></div></div></div>