[SIP Beyond VoIP] Inspecting OPTIONS

Adrian Georgescu ag at ag-projects.com
Tue Sep 7 02:06:00 CEST 2021


Hi Brian,

I would check how these command line scripts work for inspiration, they handle both incoming and outgoing requests:

https://sipsimpleclient.org/testing/ <https://sipsimpleclient.org/testing/>

Regards,
Adrian



> On 5 Sep 2021, at 09:41, Brian Chapman <brian.briliz at gmail.com> wrote:
> 
> Hi,
> I'm looking at using SIP SIMPLE to build a test harness but I have an issue that is puzzling me.
> 
> I'm new to SIP SIMPLE but am going through the documentation and experimenting with the code.
> 
> I want to inspect OPTIONS messages that are received. To do that I refer to the documentation on 
> IncomingRequest. 
> I add an observer with the NotificationCenter for the SIPIncomingRequestGotMessage. Then I add the following example code after the engine has been started.
> engine = Engine()
> 
> engine.add_incoming_request('OPTIONS')
> 
> I try this with my application and it just seems to be ignored. I even change 'OPTIONS' to 'INVITE" which is illegal...but still no error message or any SIPIncomingRequestGotMessage.
> 
> I'm using python3-sipsimple-5.2.2 under Ubuntu
> 
> When I trace notifications, I don't see any notifications at all..it seems to be an automatic response handled entirely within PJSIP but configured by sipsimple:
> --
> 2021-09-05 22:18:11.591995: Notification name=SIPApplicationDidStart sender=<__main__.McpttHarness object at 0x7fcb0b23b730>
> {}
> Listening on: sip:01398652 at 172.27.171.215:44675 <http://sip:01398652@172.27.171.215:44675/>
> Press Ctrl+D to stop the program.
> (5) b'2021-09-05 22:19:25.015         sip_endpoint.c Processing incoming message: Request msg OPTIONS/cseq=1 (rdata0x7fcafc1834c8)'
> 2021-09-05 22:19:25.019479: RECEIVED: Packet 1, +0:00:00
> 172.27.171.215:5060 <http://172.27.171.215:5060/> -(SIP over UDP)-> 172.27.171.215:44675 <http://172.27.171.215:44675/>
> OPTIONS sip:mcptt at 172.27.171.215 <mailto:sip%3Amcptt at 172.27.171.215> SIP/2.0
> Via: SIP/2.0/UDP 172.27.171.215:5060;branch=z9hG4bK-32012-1-0
> Max-Forwards: 70
> To: <sip:service at 172.27.171.215 <mailto:sip%3Aservice at 172.27.171.215>>
> From: sipp <sip:sipp at 172.27.171.215:5060 <http://sip:sipp@172.27.171.215:5060/>>;tag=1
> Call-ID: 1-32012 at 172.27.171.215 <mailto:1-32012 at 172.27.171.215>
> CSeq: 1 OPTIONS
> Contact: <sip:service at 172.27.171.215:5060 <http://sip:service@172.27.171.215:5060/>>
> Accept: application/sdp
> Content-Length: 0
> 
> 
> --
> 
> (5) b'2021-09-05 22:19:25.015               endpoint .Response msg 200/OPTIONS/cseq=1 (tdta0x7fcafc1c6838) created'
> (5) b"2021-09-05 22:19:25.015          sip_resolve.c .Target '172.27.171.215:5060 <http://172.27.171.215:5060/>' type=UDP resolved to '172.27.171.215:5060 <http://172.27.171.215:5060/>' type=UDP (UDP transport)"
> 2021-09-05 22:19:25.020904: SENDING: Packet 2, +0:00:00.001425
> 172.27.171.215:44675 <http://172.27.171.215:44675/> -(SIP over UDP)-> 172.27.171.215:5060 <http://172.27.171.215:5060/>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 172.27.171.215:5060;received=172.27.171.215;branch=z9hG4bK-32012-1-0
> Call-ID: 1-32012 at 172.27.171.215 <mailto:1-32012 at 172.27.171.215>
> From: "sipp" <sip:sipp at 172.27.171.215 <mailto:sip%3Asipp at 172.27.171.215>>;tag=1
> To: <sip:service at 172.27.171.215 <mailto:sip%3Aservice at 172.27.171.215>>;tag=z9hG4bK-32012-1-0
> CSeq: 1 OPTIONS
> Allow: SUBSCRIBE, NOTIFY, PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, MESSAGE, REFER
> Accept: application/sdp, application/conference-info+xml, application/simple-message-summary, multipart/related, application/rlmi+xml, application/pidf+xml, application/watcherinfo+xml, multipart/related, application/rlmi+xml, application/dialog-info+xml, application/watcherinfo+xml, message/sipfrag;version=2.0, application/xcap-diff+xml
> Supported: 100rel, replaces, norefersub, gruu
> Server: sipsimple 5.2.2
> Content-Length:  0
> 
> 
> --
> 
> (5) b'2021-09-05 22:19:25.015     tdta0x7fcafc1c6838 .Destroying txdata Response msg 200/OPTIONS/cseq=1 (tdta0x7fcafc1c6838)'
> 
> Any clues appreciated.
> _______________________________________________
> SIPBeyondVoIP mailing list
> SIPBeyondVoIP at lists.ag-projects.com
> https://lists.ag-projects.com/mailman/listinfo/sipbeyondvoip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20210906/3917dd02/attachment.htm>


More information about the SIPBeyondVoIP mailing list