Request SUBSCRIBE from IP phones

Hello,
I’m working on auto provisioning project using method “SIP PNP”, so IP phones send SUBSCRIBE message to Asterisk which return this error: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'SUBSCRIBE' from '<sip:MAC3043d740549f@224.0.1.75>' failed for '192.168.99.73:5060' (callid: 317235633612855-4290055812012@192.168.99.73) - No matching endpoint found.
Now I want use Asterisk to handle this message to do some action after this event like send SIP NOTIFY message or something else, does it possible using dial plan or even there is a way to handle that?

thanks in advance

There is no support for this. No using the dialplan. Nothing like that. C code would have to be written using the pubsub defined API[1] to implement it (there are implementations in the tree for other types) and you would need to figure out a way to provide an endpoint so the traffic is accepted.

[1] https://github.com/asterisk/asterisk/blob/master/include/asterisk/res_pjsip_pubsub.h

Many thanks for your response

one option you could play with is to allow anomymus call into a context that have some dialplan to create a new peer and config for the phone
and then have the phone call the extension you want to assigne it

that is how I have done it one one platfor I help develop

thank you for your replay, I’m gonna try this way and response you with result.

I’ve tried your way to handle it but Asterisk shows me that error:

WARNING[1834]: res_pjsip_pubsub.c:803 subscription_get_handler_from_rdata: No registered subscribe handler for event ua-profile from anonymous

@TheMark was answering in a general provisioning method, but for how to implement “SIP PNP” with SUBSCRIBE. There is no getting around having to write code if you want to implement the “ua-profile” event type.

unfortunately, I cannot understand the API implementation that you mentioned before so I had to try it. However, thank you for your replying.

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