[asterisk-bugs] [JIRA] (ASTERISK-13145) [patch] Presence subscription on Cisco SIP phone needs special Cisco-styled XML

Floren Munteanu (JIRA) noreply at issues.asterisk.org
Mon Jul 1 20:59:03 CDT 2013


    [ https://issues.asterisk.org/jira/browse/ASTERISK-13145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=207602#comment-207602 ] 

Floren Munteanu edited comment on ASTERISK-13145 at 7/1/13 8:57 PM:
--------------------------------------------------------------------

Thank you Joe. I managed to register the phone with a default Asterisk configuration.
The goal now is to make voip.ms work, as they require nat=yes in order to communicate with their servers. As soon as I change the NAT, the phone does not register anymore.

This is what I use as configuration:

sip.conf
{code}
context = default
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456_1:voipmspassword at montreal.voip.ms:5060
mwi => 123456_1:voipmspassword at montreal.voip.ms:5060/456021

[authentication]
auth = 123456_1:voipmspassword at montreal.voip.ms

[voipms](!)
type = friend
host = montreal.voip.ms
fromdomain = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
nat = comedia
trustrpid = yes
sendrpid = yes

[101](voipms)
defaultuser = 123456_1
fromuser = 123456_1
secret = blah
subscribe = 101
{code}

extensions.conf
{code}
[general]
static = yes
writeprotect = yes
clearglobalvars = no

[globals]
CONSOLE = Console/dsp
IAXINFO = guest
TRUNK = DAHDI/G2
TRUNKMSD = 1

[default]
include => ext101in
include => ext101out

[ext101in]
exten => 5142121122,1,Answer()

[ext101out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@101)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@101)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@101)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@101)
exten => _00.,n,Hangup()
{code}

This configuration will give me the following error:
{quote}
Registration from '<sip:101 at 192.168.1.8>' failed for '192.168.1.9:49311' - Peer is not supposed to register.
{quote}

Can I use defaultip to point it to montreal.voip.ms?
Something like:
{code}
[voipms](!)
type = friend
defaultip = 67.205.74.184
host = dynamic
fromdomain = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
nat = comedia
trustrpid = yes
sendrpid = yes
{code}

This makes the phone register, but when I call my DID from an outside line, it hangups right away:
http://pastie.org/private/zyyzoeszhjgcsbe7qc02ka
The trick is to have nat=yes or auto_force_rport. But then the phone won't register anymore... trapped into a vicious circle.

Also, can you please explain how to properly use the "subscribe" feature? I have no idea what I have to configure into SEPMAC.cnf.xml. Thank you for your help, much appreciated.
                
      was (Author: teck):
    Thank you Joe. I managed to register the phone with a default Asterisk configuration.
The goal now is to make voip.ms work, as they require nat=yes in order to communicate with their servers. As soon as I change the NAT, the phone does not register anymore.

This is what I use as configuration:

sip.conf
{code}
context = default
udpbindaddr = 192.168.1.8:5060
tcpenable = no
tcpbindaddr = 192.168.1.8:5060
transport = udp
srvlookup = yes
dtmfmode = auto
register => 123456_1:voipmspassword at montreal.voip.ms:5060
mwi => 123456_1:voipmspassword at montreal.voip.ms:5060/456021

[authentication]
auth = 123456_1:voipmspassword at montreal.voip.ms

[voipms](!)
type = friend
host = montreal.voip.ms
fromdomain = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
nat = comedia
trustrpid = yes
sendrpid = yes

[101](voipms)
defaultuser = 123456_1
fromuser = 123456_1
secret = blah
subscribe = 101
{code}

extensions.conf
{code}
[general]
static = yes
writeprotect = yes
clearglobalvars = no

[globals]
CONSOLE = Console/dsp
IAXINFO = guest
TRUNK = DAHDI/G2
TRUNKMSD = 1

[default]
include => ext101in
include => ext101out

[ext101in]
exten => 5142121122,1,Answer()

[ext101out]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@101)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@101)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@101)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@101)
exten => _00.,n,Hangup()
{code}

This configuration will give me the following error:
{quote}
Registration from '<sip:101 at 192.168.1.8>' failed for '192.168.1.9:49311' - Peer is not supposed to register.
{quote}

Can I use defaultip to point it to montreal.voip.ms?
Something like:
{code}
[voipms](!)
type = friend
defaultip = 67.205.74.184
host = dynamic
fromdomain = montreal.voip.ms
allow = !all,ulaw
cisco_usecallmanager = yes
insecure = invite
canreinvite = no
nat = comedia
trustrpid = yes
sendrpid = yes
{code}

This makes the phone register, but when I call my DID from an outside line, it hangups right away:
http://pastie.org/private/zyyzoeszhjgcsbe7qc02ka

Also, can you please explain how to properly use the "subscribe" feature? I have no idea what I have to configure into SEPMAC.cnf.xml. Thank you for your help, much appreciated.
                  
> [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, gareth-10.6.0.patch, gareth-11.2.1-dndbusy.patch, gareth-11.2.1.patch, gareth-11.3.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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list