[SIP Beyond VoIP] Inspecting OPTIONS

Brian Chapman brian.briliz at gmail.com
Sun Sep 5 14:41:24 CEST 2021


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
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 -(SIP over UDP)-> 172.27.171.215:44675
OPTIONS sip:mcptt 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>
From: sipp <sip:sipp at 172.27.171.215:5060>;tag=1
Call-ID: 1-32012 at 172.27.171.215
CSeq: 1 OPTIONS
Contact: <sip:service at 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' type=UDP resolved to '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 -(SIP over UDP)-> 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
From: "sipp" <sip:sipp at 172.27.171.215>;tag=1
To: <sip:service 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ag-projects.com/pipermail/sipbeyondvoip/attachments/20210905/b4c60a1c/attachment.htm>


More information about the SIPBeyondVoIP mailing list