Re: [Opalvoip-user] SIP subscription with opal
Brought to you by:
csoutheren,
rjongbloed
|
From: Adam K. <mar...@gm...> - 2013-04-05 13:46:25
|
Today I tried to check where the problem is more deeply and that's what I
found out:
So, that's how NOTIFY packet from asterisk looks like:
NOTIFY sip:101@192.168.2.23 SIP/2.0
CSeq: 102 NOTIFY
Via: SIP/2.0/UDP 192.168.2.23:5060;branch=z9hG4bK2e60eee5;rport
User-Agent: trx
From: <sip:101@192.168.2.23>;tag=as3fb604ec
Call-ID: ba39d08a-589c-e211-8837-0021706453a6@dell
To: <sip:101@192.168.2.23>;tag=cc4ad08a-589c-e211-8837-0021706453a6
Contact: <sip:101@192.168.2.23:5060>
Subscription-State: active
Event: dialog
Content-Type: application/dialog-info+xml
Content-Length: 203
Max-Forwards: 70
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0"
state="full" entity="sip:101@192.168.2.23">
<dialog id="101">
<state>terminated</state>
</dialog>
</dialog-info>
sippdu.cxx(2657) SIP Transaction created.
-------------------------------------------------------------------------------------------------------------------
Creating SUBSCRIBE handler in OPAL:
sipep.cxx(1213) SIP Start SUBSCRIBE
eventPackage=dialog;sla;ma
aor=sip:134@192.168.2.23
remote=192.168.2.23
local=
contact=
proxy=
authID=134
realm=
expire=180
restore=30
minRetry=default
maxRetry=default
handlers.cxx(102) SIP Constructed SUBSCRIBE handler for
sip:134@192.168.2.23
-------------------------------------------------------------------------------------------------------------------
And where problems begin (response from OPAL to PBX):
sipep.cxx(943) SIP Found a SUBSCRIBE corresponding to the NOTIFY
dialog
sippdu.cxx(2599) SIP Dialog initial sequence number 102
transports.cxx(1250) OpalUDP Binding to interface: 0.0.0.0:5060
handlers.cxx(1118) SIP No handler for NOTIFY received for event
"dialog"
sipep.cxx(297) SIP Created transport udp$192.168.2.23:5060
<if=udp$*:5060>
transports.cxx(1284) OpalUDP Started connect to 192.168.2.23:5060
transports.cxx(1475) OpalUDP Writing to interface 0 -
"192.168.2.25%p5p1"
sippdu.cxx(2294) SIP Sending PDU (370 bytes) to: rem=udp$
192.168.2.23:5060,local=udp$192.168.2.25:5060,if=192.168.2.25%p5p1
SIP/2.0 500 Internal Server Error
CSeq: 102 NOTIFY
Via: SIP/2.0/UDP 192.168.2.23:5060
;branch=z9hG4bK2e60eee5;rport=5060;received=192.168.2.23
From: <sip:101@192.168.2.23>;tag=as3fb604ec
Call-ID: ba39d08a-589c-e211-8837-0021706453a6@dell
To: <sip:101@192.168.2.23>;tag=cc4ad08a-589c-e211-8837-0021706453a6
Contact: <sip:101@192.168.2.25:5060>
Content-Length: 0
It is file "handler.cxx" in directory "sip", function
SIPSubscribeHandler::OnReceivedNOTFIY(). Seems like m_packageHandler does
not exist, so propably problem starts earlier, in
SIPNotifyHandler::CreateInstance(eventPackage), somehow it didn't create
instance of package handler based on event package. I tried to trace this
bug, but couldn't find how SIPEventPackageFactory works, the only thing I
found was some PFactory in sippdu.h.
Regards,
Adam Kozlowski
On Fri, Mar 29, 2013 at 8:12 AM, Adam K. <mar...@gm...> wrote:
> Hi,
> I have checked it today with Wireshark and when I set SIPSubscribe::Dialog
> field "event" in SUBSCRIBE packet is: "dialog;sla;ma" but there is no
> "Accept:" field. And Asterisk responds with "489 Bad Event". But when I
> change manually (in SIPEndPoint::Subscribe()) params.m_contentType to
> "application/dialog-info+xml" Asterisk responds OK for SUBSCRIBE, but
> response from OPAL for NOTIFY is "500 Internal Server Error". Event field
> in response packet from Asterisk is "dialog", content-type is
> "application/dialog-info+xml".
>
> I don't know why there is an error when I set m_contentType, I guess
> Asterisk need this field to find out which informations it should send.
>
> Regards,
> Adam
>
|