SIP NOTIFY - parse response

Dear all,

I am building an Asterisk solution and I want to establish MWI functionality on SIP signaling.
After communicating with the provider, he consulted to use the SIP NOTIFY signaling.

I am therefore using the “pjsip send notify” utility, in order to trigger the corresponding SIP NOTIFY messages and it seems to be working fine.
However, I need to somehow know the response of a SIP NOTIFY, in order to proceed with actions,
in case for example that a 403 FORBIDDEN is received.
I am triggering the SIP NOTIFY from a PHP script via using the system command /usr/sbin/asterisk -rx ‘pjsip send notify …’

How could I somehow parse the response on this NOTIFY message? Should I send the NOTIFY with another way? Could you please advice?

Thank you in advance for your time.

Asterisk isn’t written to do this as you want. The SIP NOTIFY functionality you’re using is fire-and-forget. It’s not a toolkit to interact with the SIP stack at a higher level. Another solution would be better, most likely.

I was afraid so … What other options do I have, in order to send SIP NOTIFY and somehow process the response?

You run something like Kamailio or OpenSIPs to sit between Asterisk and the devices you want to send NOTIFYs to and use that to deal with the SIP replies.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.