Hello,
I am trying to add event "reg" to pjsip-simple. I can send SUBSCRIBE using my new event module but when I receive NOTIFY pjsip replies with 400 Bad Request. I have added a pjsip_evsub_user structure for my event "reg" but its on_rx_notify callback is never called. Other callbacks are called i.e. on_evsub_state and on_tsx_state.
My subscribe message is as follows:
SUBSCRIBE sip:bob@xxxxxxxxxxxxx SIP/2.0
Via: SIP/2.0/UDP 223.1.1.8:4060;rport;branch=z9hG4bKPjsmxhZj9iwYZXjBCTuB0sdj4oW-Yrmfm8
Max-Forwards: 70
From: sip:bob@xxxxxxxxxxxxx;tag=M84OrZsudKTRY1Q1oszFbXH0ktj9WBkf
To: sip:bob@xxxxxxxxxxxxx
Contact: <sip:bob@223.1.1.8:4060;ob>;+sip.instance="<urn:gsma:imei:358429069569951>"
Call-ID: 8BYooo3JZwxeKkfizQV.YuBoa3IAu7iV
CSeq: 11538 SUBSCRIBE
Route: <sip:10.17.4.86:5060;lr>
Event: reg
Expires: 300
Accept: application/reginfo+xml
Allow-Events: presence, message-summary, reg
User-Agent: PJSUA v2.5.5 win32-1.0/i386
Content-Length: 0
And my notify message is as follows:
NOTIFY sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[service]@[local_ip]>;tag=[call_number]
To: <sip:[service]@[local_ip]>
Call-ID: [call_id]
CSeq: [cseq] NOTIFY
Contact: sip:[local_ip]:[local_port]
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Event: reg
Subscription-State: active;expires=60000
Content-Type: application/reginfo+xml
NOTIFY sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[service]@[local_ip]>;tag=[call_number]
To: <sip:[service]@[local_ip]>
Call-ID: [call_id]
CSeq: [cseq] NOTIFY
Contact: sip:[local_ip]:[local_port]
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Event: reg
Subscription-State: active;expires=60000
Content-Type: application/reginfo+xml
Best Regards,
Muhammad Usman Shahid,
Engineer
National University of Sciences and Technology,
School of Electrical Engineering and Computer Sciences,
Islamabad, Pakistan
_______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@xxxxxxxxxxxxxxx http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org