[asterisk-bugs] [JIRA] (ASTERISK-21148) Asterisk use '(null)' in 'via' header and 'call-id' header when relaying SIP MESSAGE
Zhi Cheng (JIRA)
noreply at issues.asterisk.org
Fri Feb 22 01:21:18 CST 2013
Zhi Cheng created ASTERISK-21148:
------------------------------------
Summary: Asterisk use '(null)' in 'via' header and 'call-id' header when relaying SIP MESSAGE
Key: ASTERISK-21148
URL: https://issues.asterisk.org/jira/browse/ASTERISK-21148
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
[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()
sip.conf on 192.168.0.213
[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
dongle.conf on 192.168.0.213
[donglee180]
context=mobile
dtmf=relax
rxgain=4
txgain=0
audio=/dev/ttyUSB2
data=/dev/ttyUSB3
extensions.conf on 192.168.0.1
[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()
sip.conf on 192.168.0.1
[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
--
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