[asterisk-bugs] [JIRA] (ASTERISK-13145) [patch] Presence subscription on Cisco SIP phone needs special Cisco-styled XML
Philippe Martorell (JIRA)
noreply at issues.asterisk.org
Wed Jul 16 11:02:10 CDT 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-13145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220631#comment-220631 ]
Philippe Martorell commented on ASTERISK-13145:
-----------------------------------------------
Dear Gareth and all,
Many thanks for your helpful tips and huge work.
Just to let you know, I followed your procedure to patch an asterisk 11.9.0 on FreePBX 5.211 x64. When trying to setup a conference between 3 Cisco 7945 phones, I get a segmentation fault causing a crash in Asterisk... Let me know if I can help in fixing this.
Below the trace :
{panel}
localhost*CLI>
<--- SIP read from UDP:10.0.1.73:51807 --->
REFER sip:10.0.1.11 SIP/2.0
Via: SIP/2.0/UDP 10.0.1.73:5060;branch=z9hG4bK66661c63
From: "3001" <sip:3001 at 10.0.1.11>;tag=ec44761e34fe000e0f9e47dd-05237b9f
To: <sip:3002 at 10.0.1.11>
Call-ID: OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73
Max-Forwards: 70
Date: Wed, 16 Jul 2014 15:31:40 GMT
CSeq: 101 REFER
User-Agent: Cisco-CP7965G/9.3.1
Contact: <sip:3001 at 10.0.1.73:5060;transport=udp>
Referred-By: "3001" <sip:3001 at 10.0.1.11>
Refer-To: cid:39ec7351 at 10.0.1.73
Content-Length: 953
Content-Type: application/x-cisco-remotecc-request+xml
Content-Disposition: session;handling=required
Content-Id: <39ec7351 at 10.0.1.73>
<?xml version="1.0" encoding="UTF-8"?>
<x-cisco-remotecc-request> <softkeyeventmsg> <softkeyevent>Conference</softkeyevent> <dialogid> <callid>ec44761e-34fe0009-4af8dbf7-8e254713 at 10.0.1.73</callid> <localtag>ec44761e34fe000ced74dfe7-70c4fcc3</localtag> <remotetag>as684306ef</remotetag> </dialogid> <linenumber>0</linenumber> <participantnum>0</participantnum> <consultdialogid> <callid>ec44761e-34fe000a-625609ae-9bb9c0dd at 10.0.1.73</callid> <localtag>ec44761e34fe000d27fa818c-8cb7feb3</localtag> <remotetag>as1247718a</remotetag> </consultdialogid> <state>false</state> <joindialogid> <callid></callid> <localtag></localtag> <remotetag></remotetag> </joindialogid> <eventdata> <invocationtype>explicit</invocationtype> </eventdata> <userdata></userdata> <softkeyid>0</softkeyid> <applicationid>0</applicationid> </softkeyeventmsg>
</x-cisco-remotecc-request>
<------------->
--- (16 headers 3 lines) ---
Sending to 10.0.1.73:5060 (no NAT)
Call OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73 got a SIP call transfer from caller: (REFER)!
Found peer '3001' for '3001' from 10.0.1.73:51807
<--- Transmitting (no NAT) to 10.0.1.73:5060 --->
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 10.0.1.73:5060;branch=z9hG4bK66661c63;received=10.0.1.73
From: "3001" <sip:3001 at 10.0.1.11>;tag=ec44761e34fe000e0f9e47dd-05237b9f
To: <sip:3002 at 10.0.1.11>;tag=as75299b36
Call-ID: OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73
CSeq: 101 REFER
Server: FPBX-2.11.0(1.8.28.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces,timer
Contact: <sip:10.0.1.11 at 10.0.1.11:5060>
Content-Length: 0
<------------>
Reliably Transmitting (no NAT) to 10.0.1.73:5060:
NOTIFY sip:3001 at 10.0.1.73:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.0.1.11:5060;branch=z9hG4bK711f1d04
Max-Forwards: 70
From: <sip:Unknown at 10.0.1.11>;tag=as75299b36
To: <sip:3001 at 10.0.1.73:5060;transport=udp>;tag=ec44761e34fe000e0f9e47dd-05237b9f
Contact: <sip:Unknown at 10.0.1.11:5060>
Call-ID: OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73
CSeq: 101 NOTIFY
User-Agent: FPBX-2.11.0(1.8.28.2)
Event: refer
Subscription-State: active;expires=60
Content-Length: 0
---
Scheduling destruction of SIP dialog '530ba4cd76ea06ec397fb10d219d9c43 at 10.0.1.11:5060' in 32000 ms (Method: REFER)
Reliably Transmitting (no NAT) to 10.0.1.73:5060:
REFER sip:3001 at 10.0.1.73:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.0.1.11:5060;branch=z9hG4bK520b0855
Max-Forwards: 70
From: <sip:Unknown at 10.0.1.11>;tag=as4d749031
To: <sip:3001 at 10.0.1.73:5060;transport=udp>
Contact: <sip:Unknown at 10.0.1.11:5060>
Call-ID: 530ba4cd76ea06ec397fb10d219d9c43 at 10.0.1.11:5060
CSeq: 101 REFER
User-Agent: FPBX-2.11.0(1.8.28.2)
Date: Wed, 16 Jul 2014 15:31:41 GMT
Require: norefersub
Refer-To: cid:0eda1c50
Referred-By: <sip:10.0.1.11:5060>
Content-Id: 0eda1c50
Content-Type: application/x-cisco-remotecc-request+xml
Expires: 0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces,timer
Content-Length: 267
<x-cisco-remotecc-request>
<holdretrievereq>
<dialogid>
<callid>ec44761e-34fe0009-4af8dbf7-8e254713 at 10.0.1.73</callid>
<localtag>ec44761e34fe000ced74dfe7-70c4fcc3</localtag>
<remotetag>as684306ef</remotetag>
</dialogid>
</holdretrievereq>
</x-cisco-remotecc-request>
---
Reliably Transmitting (no NAT) to 10.0.1.73:5060:
NOTIFY sip:3001 at 10.0.1.73:5060;transport=udp SIP/2.0
Via: SIP/2.0/UDP 10.0.1.11:5060;branch=z9hG4bK0f25ee1b
Max-Forwards: 70
From: <sip:Unknown at 10.0.1.11>;tag=as75299b36
To: <sip:3001 at 10.0.1.73:5060;transport=udp>;tag=ec44761e34fe000e0f9e47dd-05237b9f
Contact: <sip:Unknown at 10.0.1.11:5060>
Call-ID: OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73
CSeq: 102 NOTIFY
User-Agent: FPBX-2.11.0(1.8.28.2)
Event: refer
Subscription-State: terminated;reason=noresource
Content-Type: application/x-cisco-remotecc-response+xml
Content-Length: 97
<x-cisco-remotecc-response>
<response>
<code>200</code>
</response>
</x-cisco-remotecc-response>
---
Scheduling destruction of SIP dialog 'OutOfDialog--000b-6a7dfd29-5a42edfb at 10.0.1.73' in 32000 ms (Method: REFER)
set_destination: Parsing <sip:3001 at 10.0.1.73:5060;transport=udp> for address/port to send to
set_destination: set destination to 10.0.1.73:5060
localhost*CLI> /usr/sbin/safe_asterisk: line 145: 6959 Segmentation fault (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} > /dev/${TTY} 2>&1 < /dev/${TTY}
Asterisk ended with exit status 139
Disconnected from Asterisk server
Asterisk exited on signal 11.
Asterisk cleanly ending (0).
Executing last minute cleanups
[root at localhost asterisk]# Automatically restarting Asterisk.
{panel}
> [patch] Presence subscription on Cisco SIP phone needs special Cisco-styled XML
> -------------------------------------------------------------------------------
>
> Key: ASTERISK-13145
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-13145
> Project: Asterisk
> Issue Type: New Feature
> Components: Channels/chan_sip/NewFeature
> Reporter: David McNett
> Attachments: 01-btias.patch, 02-media-attrib-sdp.patch, 03-media-attrib-sdp-backport.patch, 04-imageattr.patch, 7965.xml, 8001 to 8003 and hangup.pcap, 8001 to 8003 and pickup then talk then hangup.pcap, asterisk-1.8.7.0-chan_sip.patch, backtrace.txt, Capture - CSO Presence - Lift and Replace Handset.pcap, Capture - CSO Presence - Ring between 2 monitored extensions.pcap, chan_sip.c_available_on-the-phone.patch, chan_sip.c_blf_available_on-the-phone.patch, chan_sip.c.patch, cisco-blf-asterisk.1.6.0.26.patch, cisco-blf-asterisk.1.6.2.13.patch, cisco-blf-asterisk.1.8.0.patch, core-ast115-sccp.tar.gz, gareth-10.6.0.patch, gareth-11.2.1-dndbusy.patch, gareth-11.9.0.patch, gareth-1.8.14.0.patch, gareth-featurepolicy.xml, gareth-mk-1.8.13.0.patch, gareth-softkeys.xml, gareth-softkeys.xml, memleak_astdb.patch, messages-1, Poly_reboot.log, rjw-11.4.0.patch, second-sip-trace-7941-9-1-1SR1.txt, sip-trace-7941-9-1-1SR1.txt, trace2.txt
>
>
> Cisco phones appear to be unable to parse the existing PIDF XML being generated by Asterisk for presence notification. I've attached a patch which produces well-formed (but incomplete) XML which will satisfy a Cisco phone. The patch as supplied will successfully render a "busy" subscription, but does not send a subsequent "available" notification, so presence detection only half works currently.
> I suspect the next step might be to watch some CallManager SIP traffic to identify precisely what XML tags the phone is expecting in order to properly parse an available subscription, but I'm not in a position to do that. I'll continue to work with this, though, and perhaps may be able to stumble upon the precise data the Cisco phone is looking for.
> {{****** ADDITIONAL INFORMATION ******}}
> I believe that this requires the Cisco phones be configured to use SIP TCP when connecting to Asterisk.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list