Error while sending sms via SIP

When trying to send SMS via my freepbx server using a Linphone sofphone I got several errors when typing sip set debug on on asterisk console and I got on my linphone “[Mon Feb 17 12:43:10 2020] Your message to 53584523 has failed. Retry later.” :
I want to send SMS to my smarthphone which number is 53584523 (calls work perfectly) .This is set debug on results,I have for example SIP/2.0 401 Unauthorized , SIP/2.0 401 Unauthorized, SIP/2.0 404 Not Found and unsupported media type error.Thanks for your help

:

<— SIP read from UDP:192.168.20.10:5060 —>
MESSAGE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.CwnP5b6Wp;rport
From: sip:[email protected];tag=hdpZn9Fx-
To: sip:[email protected]
CSeq: 20 MESSAGE
Call-ID: elwH6dHZcu
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: application/im-iscomposing+xml
Content-Length: 282
Date: Mon, 17 Feb 2020 12:43:09 GMT
User-Agent: Linphone Desktop/4.1.1 (belle-sip/1.6.3)

<?xml version="1.0" encoding="UTF-8"?>

active60
<------------->
— (12 headers 2 lines) —
Sending to 192.168.20.10:5060 (NAT)
Receiving message!

<— Transmitting (NAT) to 192.168.20.10:5060 —>
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.CwnP5b6Wp;received=192.168.20.10;rport=5060
From: sip:[email protected];tag=hdpZn9Fx-
To: sip:[email protected];tag=as605f30b4
Call-ID: elwH6dHZcu
CSeq: 20 MESSAGE
Server: FPBX-14.0.13.24(13.29.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘elwH6dHZcu’ in 32000 ms (Method: MESSAGE)

<— SIP read from UDP:192.168.20.10:5060 —>
MESSAGE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.usBQMkqBB;rport
From: sip:[email protected];tag=45kI9FZK0
To: sip:[email protected]
CSeq: 20 MESSAGE
Call-ID: 9qg9M0HYZK
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: text/plain
Content-Length: 4
Date: Mon, 17 Feb 2020 12:43:10 GMT
User-Agent: Linphone Desktop/4.1.1 (belle-sip/1.6.3)

allo
<------------->
— (12 headers 1 lines) —
Sending to 192.168.20.10:5060 (NAT)
Receiving message!
Looking for 53584523 in dpma_message_context (domain 192.168.20.3)
– Executing [[email protected]_message_context:1] NoOp(“Message/ast_msg_queue”, “SMS receiving dialplan invoked”) in new stack

<— Transmitting (NAT) to 192.168.20.10:5060 —>
SIP/2.0 202 Accepted
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.usBQMkqBB;received=192.168.20.10;rport=5060
From: sip:[email protected];tag=45kI9FZK0
To: sip:[email protected];tag=as5d61d737
Call-ID: 9qg9M0HYZK
CSeq: 20 MESSAGE
Server: FPBX-14.0.13.24(13.29.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘9qg9M0HYZK’ in 32000 ms (Method: MESSAGE)
– Executing [[email protected]_message_context:2] NoOp(“Message/ast_msg_queue”, “To sip:[email protected]:5060”) in new stack
– Executing [[email protected]_message_context:3] NoOp(“Message/ast_msg_queue”, “From sip:[email protected]”) in new stack
– Executing [[email protected]_message_context:4] NoOp(“Message/ast_msg_queue”, “Body allo”) in new stack
– Executing [[email protected]_message_context:5] Set(“Message/ast_msg_queue”, “ACTUALTO=sip:53584523”) in new stack
– Executing [[email protected]_message_context:6] MessageSend(“Message/ast_msg_queue”, “sip:53584523,sip:[email protected]”) in new stack
[2020-02-17 12:43:10] WARNING[8042][C-00000007]: chan_sip.c:6276 create_addr: Purely numeric hostname (53584523), and not a peer–rejecting!
– Executing [[email protected]_message_context:7] NoOp(“Message/ast_msg_queue”, “Send status is FAILURE”) in new stack
– Executing [[email protected]_message_context:8] GotoIf(“Message/ast_msg_queue”, “1?sendfailedmsg”) in new stack
– Goto (dpma_message_context,53584523,10)
– Executing [[email protected]_message_context:10] Set(“Message/ast_msg_queue”, “MESSAGE(body)=”[Mon Feb 17 12:43:10 2020] Your message to 53584523 has failed. Retry later."") in new stack
– Executing [[email protected]_message_context:11] Set(“Message/ast_msg_queue”, "ME_1=sip:[email protected]>") in new stack
– Executing [[email protected]_message_context:12] Set(“Message/ast_msg_queue”, “ACTUALFROM=sip:1002”) in new stack
– Executing [[email protected]_message_context:13] MessageSend(“Message/ast_msg_queue”, “sip:1002,ServiceCenter”) in new stack
Reliably Transmitting (NAT) to 192.168.20.10:5060:
MESSAGE sip:[email protected];transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.20.3:5060;branch=z9hG4bK1573d1a6;rport
Max-Forwards: 70
From: “ServiceCenter” sip:[email protected];tag=as6e047433
To: sip:[email protected];transport=udp
Contact: sip:[email protected]:5060
Call-ID: [email protected][::1]:5060
CSeq: 102 MESSAGE
User-Agent: FPBX-14.0.13.24(13.29.2)
Content-Type: text/plain;charset=UTF-8
Content-Length: 78

“[Mon Feb 17 12:43:10 2020] Your message to 53584523 has failed. Retry later.”

Scheduling destruction of SIP dialog ‘[email protected][::1]:5060’ in 6400 ms (Method: MESSAGE)
Really destroying SIP dialog ‘[email protected][::1]:5060’ Method: MESSAGE
– Executing [[email protected]_message_context:14] Hangup(“Message/ast_msg_queue”, “”) in new stack
== Spawn extension (dpma_message_context, 53584523, 14) exited non-zero on ‘Message/ast_msg_queue’

<— SIP read from UDP:192.168.20.10:5060 —>
MESSAGE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.O5Rombk8E;rport
From: sip:[email protected];tag=wdJF3jYze
To: “ServiceCenter” sip:[email protected]
CSeq: 20 MESSAGE
Call-ID: ZUE1hx8Xvd
Max-Forwards: 70
Supported: replaces, outbound
Content-Type: message/imdn+xml
Content-Length: 274
Date: Mon, 17 Feb 2020 12:43:10 GMT
User-Agent: Linphone Desktop/4.1.1 (belle-sip/1.6.3)

<?xml version="1.0" encoding="UTF-8"?>

[email protected][::1]:50602020-02-17T12:43:10Z
<------------->
— (12 headers 2 lines) —
Sending to 192.168.20.10:5060 (NAT)
Receiving message!

<— Transmitting (NAT) to 192.168.20.10:5060 —>
SIP/2.0 415 Unsupported Media Type
Via: SIP/2.0/UDP 192.168.20.10:5060;branch=z9hG4bK.O5Rombk8E;received=192.168.20.10;rport=5060
From: sip:[email protected];tag=wdJF3jYze
To: “ServiceCenter” sip:[email protected];tag=as6d54fbad
Call-ID: ZUE1hx8Xvd
CSeq: 20 MESSAGE
Server: FPBX-14.0.13.24(13.29.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘ZUE1hx8Xvd’ in 32000 ms (Method: MESSAGE)

<— SIP read from UDP:192.168.20.10:5060 —>
SIP/2.0 200 Ok
Via: SIP/2.0/UDP 192.168.20.3:5060;branch=z9hG4bK1573d1a6;rport
From: “ServiceCenter” sip:[email protected];tag=as6e047433
To: sip:[email protected];transport=udp;tag=at8w4DM
Call-ID: [email protected][::1]:5060
CSeq: 102 MESSAGE

<------------->
— (6 headers 0 lines) —
Really destroying SIP dialog ‘[email protected][::1]:5060’ Method: MESSAGE

<— SIP read from UDP:192.168.20.10:41818 —>
REGISTER sip:192.168.20.3:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.20.10:41818;branch=z9hG4bK-524287-1—e85f659cf032c4a8;rport
Max-Forwards: 70
Contact: sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP
To: sip:[email protected]:5060;transport=UDP
From: sip:[email protected]:5060;transport=UDP;tag=ac66bb41
Call-ID: IzxDds9PtvjHgDOf8UJ5uw…
CSeq: 137 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.3.7 rv2.9.30
Authorization: Digest username=“1992”,realm=“asterisk”,nonce=“0ef31d4e”,uri=“sip:192.168.20.3:5060;transport=UDP”,response=“b2d0b8744ce678e313e7d70777d8d5d0”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.20.10:41818 (NAT)
Sending to 192.168.20.10:41818 (NAT)

<— Transmitting (NAT) to 192.168.20.10:41818 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.20.10:41818;branch=z9hG4bK-524287-1—e85f659cf032c4a8;received=192.168.20.10;rport=41818
From: sip:[email protected]:5060;transport=UDP;tag=ac66bb41
To: sip:[email protected]:5060;transport=UDP;tag=as1075ea75
Call-ID: IzxDds9PtvjHgDOf8UJ5uw…
CSeq: 137 REGISTER
Server: FPBX-14.0.13.24(13.29.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce=“6929e230”
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘IzxDds9PtvjHgDOf8UJ5uw…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.20.10:41818 —>
REGISTER sip:192.168.20.3:5060;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.20.10:41818;branch=z9hG4bK-524287-1—15ee7145ae04880d;rport
Max-Forwards: 70
Contact: sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP
To: sip:[email protected]:5060;transport=UDP
From: sip:[email protected]:5060;transport=UDP;tag=ac66bb41
Call-ID: IzxDds9PtvjHgDOf8UJ5uw…
CSeq: 138 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
User-Agent: Z 5.3.7 rv2.9.30
Authorization: Digest username=“1992”,realm=“asterisk”,nonce=“6929e230”,uri=“sip:192.168.20.3:5060;transport=UDP”,response=“dbe5fdb08cb8b67c6ab66d0007715616”,algorithm=MD5
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Sending to 192.168.20.10:41818 (NAT)
Reliably Transmitting (NAT) to 192.168.20.10:41818:
OPTIONS sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 192.168.20.3:5060;branch=z9hG4bK32acbc87;rport
Max-Forwards: 70
From: “Unknown” sip:[email protected];tag=as0c63a747
To: sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP
Contact: sip:[email protected]:5060
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
User-Agent: FPBX-14.0.13.24(13.29.2)
Date: Mon, 17 Feb 2020 12:43:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<— Transmitting (NAT) to 192.168.20.10:41818 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.20.10:41818;branch=z9hG4bK-524287-1—15ee7145ae04880d;received=192.168.20.10;rport=41818
From: sip:[email protected]:5060;transport=UDP;tag=ac66bb41
To: sip:[email protected]:5060;transport=UDP;tag=as1075ea75
Call-ID: IzxDds9PtvjHgDOf8UJ5uw…
CSeq: 138 REGISTER
Server: FPBX-14.0.13.24(13.29.2)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Expires: 60
Contact: sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP;expires=60
Date: Mon, 17 Feb 2020 12:43:13 GMT
Content-Length: 0

<------------>
Scheduling destruction of SIP dialog ‘IzxDds9PtvjHgDOf8UJ5uw…’ in 32000 ms (Method: REGISTER)

<— SIP read from UDP:192.168.20.10:41818 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.20.3:5060;branch=z9hG4bK32acbc87;rport=5060
Contact: sip:192.168.20.10:41818
To: sip:[email protected]:41818;rinstance=067e33109b32057f;transport=UDP;tag=6b05b34d
From: “Unknown” sip:[email protected];tag=as0c63a747
Call-ID: [email protected]:5060
CSeq: 102 OPTIONS
Accept: application/sdp, application/sdp
Accept-Language: en
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.3.7 rv2.9.30
Allow-Events: presence, kpml, talk
Content-Length: 0

<------------->
— (14 headers 0 lines) —
Really destroying SIP dialog ‘[email protected]:5060’ Method: OPTIONS

<— SIP read from UDP:192.168.20.10:5060 —>

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

<— SIP read from UDP:192.168.20.4:5060 —>
REGISTER sip:192.168.20.3 SIP/2.0
Via: SIP/2.0/UDP 192.168.20.4:5060;branch=z9hG4bK0706db3b;rport
Max-Forwards: 70
From: sip:[email protected];tag=as74c4e565
To: sip:[email protected]
Call-ID: [email protected]
CSeq: 231 REGISTER
User-Agent: VoxStack Wireless Gateway
Authorization: Digest username=“1900”, realm=“asterisk”, algorithm=MD5, uri=“sip:192.168.20.3”, nonce=“285b31e1”, response=“ae68941458b5216a70f147d07ee1ce13”
Expires: 120
Contact: sip:[email protected]:5060
Content-Length: 0

Does your SIP provider support SMS relay ?

Yes It’s supports SMS relay

That’s part of the problem, I’m pretty sure. Having never done anything that looks like this, though, I’m immediately out of my depth. There are many articles “in the wild” about Asterisk doing various SMS implementations - I’m sure there’s information in those that should be able to help.

This seems to be an DNS problem.I have read many articles about sending SMS via a SIP line but It seems that on freepbx we cannot send SMS to an external number via SIP.The SMS is sent trough on openvox gsm gatweay which supports SMS but the SMS never arrives to the destination

To be super clear - FreePBX is a management GUI and context creator. Your issue is with Asterisk.

I doubt that the problem is DNS - I’m going to guess that you haven’t set up the outbound trunk or outbound route is not passing the call to the interface.

I have an outbound route and an outbound trunk since I’m able to call external numbers using freepbx and the openvox gsm gateway. With my linphone softphone when I send the sms I got the error “your message has failed Retry later”.
This is the tuto that I have followed http://forum.thewebmachine.net/enable-sip-sms-support-this-is-not-cellular-sms-t42.html
Do I need to configure It also for the SMS?
If so what can I do for this?

As I said in my last reply, I’m immediately out of my depth on this. Something in your tutorial should tell you how to make the call route to your GSM gateway.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.