No subject


Fri Sep 2 03:59:05 CDT 2011


{noformat}
[Feb 23 02:29:02] VERBOSE[13700][C-00000015] pbx.c:     -- Executing [s at inmobilesms:2] Set("Message/ast_msg_queue", "ACTUALFROM="10658487" <sip:10658487") in new stack
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Evaluating 'ACTUALFROM' (from 'ACTUALFROM}' len 10)
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Result of 'ACTUALFROM' is '"10658487" <sip:10658487'
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Function result is '10658487'
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Launching 'Set'
[Feb 23 02:29:02] VERBOSE[13700][C-00000015] pbx.c:     -- Executing [s at inmobilesms:3] Set("Message/ast_msg_queue", "ACTUALFROM=10658487") in new stack
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Result of 'ACTUALFROM' is '10658487'
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Result of 'ACTUALFROM' is '10658487'
[Feb 23 02:29:02] DEBUG[13700][C-00000015] pbx.c: Launching 'MessageSend'
[Feb 23 02:29:02] VERBOSE[13700][C-00000015] pbx.c:     -- Executing [s at inmobilesms:4] MessageSend("Message/ast_msg_queue", "SIP:2204, "10658487" <10658487>") in new stack
[Feb 23 02:29:02] DEBUG[13700][C-00000015] chan_sip.c: Allocating new SIP dialog for 0fbab17f578da9ee682c647a5757b32e@(null) - MESSAGE (No RTP)
{noformat}

Looks to me like this part of your dialplan is not working properly:

{noformat}
[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}

ACTUALFROM does not have a proper host address and therefore the host address is set to (null) which is correct since there is no host address that could be set.
                  
> 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
>            Assignee: Zhi Cheng
>         Attachments: debuglog, voip.cap
>
>
> 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