Asterisk 10 Not Setting Return Address Properly on SMS SIP


#1

I have this as a test in my extensions.conf file:

[messages]
exten => 7777,1,Set(MESSAGE(body)=Hello back!)
exten => 7777,2,MessageSend(sip:503XXXXXXX@67.231.8.XXX)

When I call the extension I get this result:

– Executing [7777@messages:1] Set(“SIP/901-00000042”, “MESSAGE(body)=Hello back!”) in new stack
– Executing [7777@messages:2] MessageSend(“SIP/901-00000042”, "sip:503XXXXXXX@67.231.8.XXX") in new stack
Reliably Transmitting (NAT) to 67.231.8.XXX:5060:
MESSAGE sip:67.231.8.XXX SIP/2.0
Via: SIP/2.0/UDP 107.22.85.XXX:5060;branch=z9hG4bK3d4cc080;rport
Max-Forwards: 70
From: “asterisk” sip:asterisk@107.22.85.XXX;tag=as00bf1c28
To: sip:67.231.8.XXX
Contact: sip:asterisk@107.22.85.XXX:5060
Call-ID: 28b41180431f90532cd26fc647d93bb8@174.129.239.190:0
CSeq: 102 MESSAGE
User-Agent: Asterisk PBX 10.0.0-beta2
Content-Type: text/plain;charset=UTF-8
Content-Length: 11

Hello back!

Scheduling destruction of SIP dialog ‘28b41180431f90532cd26fc647d93bb8@174.129.239.190:0’ in 32000 ms (Method: MESSAGE)
– Auto fallthrough, channel ‘SIP/901-00000042’ status is 'UNKNOWN’
Scheduling destruction of SIP dialog ‘MTI1MDJmMzM4ZWJmMTY5MmU2MzFjYjBmMmY5M2I5OGI.’ in 32000 ms (Method: INVITE)

<— Reliably Transmitting (NAT) to 50.43.101.83:63263 —>
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 50.43.101.83:63263;branch=z9hG4bK-d8754z-cd88897beba3903f-1–d8754z;received=50.43.101.83;rport=63263
From: sip:901@107.22.85.XXX;tag=92362c37
To: sip:7777@107.22.85.XXX;tag=as33a732fd
Call-ID: MTI1MDJmMzM4ZWJmMTY5MmU2MzFjYjBmMmY5M2I5OGI.
CSeq: 1 INVITE
Server: Asterisk PBX 10.0.0-beta2
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0

<------------>

Notice the to field drops the phone number, it should be “To: sip:503XXXXXXX@67.231.8.XXX”, but instead it gets cut down to: “To: sip:67.231.8.XXX”.

Thanks!