[asterisk-bugs] [JIRA] (ASTERISK-21169) Asterisk use '(null)' in 'via' header when relaying SIP MESSAGE

Matt Jordan (JIRA) noreply at issues.asterisk.org
Tue Feb 26 07:03:19 CST 2013


Matt Jordan created ASTERISK-21169:
--------------------------------------

             Summary: Asterisk use '(null)' in 'via' header when relaying SIP MESSAGE
                 Key: ASTERISK-21169
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21169
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Channels/chan_sip/Messaging
    Affects Versions: 11.2.1
         Environment: openwrt 12.09 beta
            Reporter: Zhi Cheng


My setup:
csipsimple at android --> main server --> GSM gateway server(using chan_dongle)
192.168.0.83            192.168.0.1        192.168.0.213

Both servers are running asterisk 11.2.1. When a SMS arrived from GSM network on 192.168.0.213, that message will translate to SIP MESSAGE and passed through main asterisk server(192.168.0.1) to csipsimple, but when main asterisk server relaying the MESSAGE, the 'via' header is '(null)', cause csipsimple simply drop packet.


extensions.conf on 192.168.0.213
{noformat}
[mobile]
exten => sms,1,Noop(Incoming SMS from ${CALLERID(all)})
exten => sms,n,Set(MESSAGE(body)=${BASE64_DECODE(${SMS_BASE64})})
exten => sms,n,Set(ACTUALFROM=${CALLERID(num)})
exten => sms,n,Set(ACTUALFROM=${STRREPLACE(ACTUALFROM,+86)})
exten => sms,n,MessageSend(SIP:homemain, "${ACTUALFROM}" <${ACTUALFROM}>)
exten => sms,n,Hangup()
[mobilesms]
exten => _X.,1,NoOp(Send SMS To ${MESSAGE(to)} : ${MESSAGE(body)})
exten => _X.,n,Set(ACTUALTO=+86${CUT(CUT(MESSAGE(to),@,1),:,2)})
exten => _X.,n,DongleSendSMS(donglee180,${ACTUALTO},${MESSAGE(body)})
exten => _X.,n,Hangup()
{noformat}

sip.conf on 192.168.0.213
{noformat}
[homemain]
type=friend
host=192.168.0.1
fromdomain=192.168.0.213
directmedia=no
insecure=port,invite
qualify=yes
context=intern
dtmfmode=rfc2833
outofcall_message_context=mobilesms
{noformat}

dongle.conf on 192.168.0.213
{noformat}
[donglee180]
context=mobile
dtmf=relax
rxgain=4
txgain=0
audio=/dev/ttyUSB2
data=/dev/ttyUSB3
{noformat}

extensions.conf on 192.168.0.1
{noformat}
[outmobilesms]
exten => _X.,1,NoOp(Send SMS To ${MESSAGE(to)} : ${MESSAGE(body)})
exten => _X.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _X.,n,MessageSend(${ACTUALTO}@192.168.0.213, sip:"asterisk" <asterisk>)
exten => _X.,n,Hangup()
[inmobilesms]
exten => s,1,NoOp(Incoming SMS from ${MESSAGE(from)} : ${MESSAGE(body)})
exten => s,n,Set(ACTUALFROM=${CUT(MESSAGE(from),@,1)})
exten => s,n,Set(ACTUALFROM=${CUT(ACTUALFROM,:,2)})
exten => s,n,MessageSend(SIP:2204, "${ACTUALFROM}" <${ACTUALFROM}>)
exten => s,n,Hangup()
{noformat}

sip.conf on 192.168.0.1
{noformat}
[mobile-out]
type=friend
host=192.168.0.213
fromdomain=192.168.0.1
directmedia=no
insecure=port,invite
qualify=yes
dtmfmode=rfc2833
context=mobile
outofcall_message_context=inmobilesms
disallow=gsm
[2204]
type=friend
defaultuser=2204
secret=pass
host=dynamic
context=internmobile
dtmfmode=rfc2833
directmedia=no
nat=force_rport,comedia
mailbox=2204
outofcall_message_context=outmobilesms
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list