Can't Receive SMS message from GSM Gateway (GoIP-1)

Hi Guys,

I am trying to configure a GoIP-1 (G610) from Hybertone to work with my FreePBX install. SO far I got the following working: Dial out from FreepBX through GoIP, Dial in from GoIP to FreePBX and Fowarding SMS from GoIP to another GSM phone. I can’t manage to get recive SMS into FreePBX and have not tried yet sending SMS from FreePBX.

I think the problem is in my configuration of FreepBX but can’t figure what I am doing wrong. It seems FreePBX is rejecting the incomming SIP request from GoIP to relay the Message: below are the 2 frames from A WireShark trace related to the reject:

Frame 27: 446 bytes on wire (3568 bits), 446 bytes captured (3568 bits) on interface 0 Ethernet II, Src: DblTechn_01:d3:1c (38:3f:10:01:d3:1c), Dst: Elitegro_a7:1c:c6 (00:1b:b9:a7:1c:c6) Internet Protocol Version 4, Src: 192.168.1.104 (192.168.1.104), Dst: 192.168.1.200 (192.168.1.200) User Datagram Protocol, Src Port: x11 (6050), Dst Port: x11 (6050) Session Initiation Protocol (MESSAGE) Request-Line: MESSAGE sip:[email protected]:6050 SIP/2.0 Method: MESSAGE Request-URI: sip:[email protected]:6050 [Resent Packet: False] Message Header Via: SIP/2.0/UDP 192.168.1.104:6050;branch=z9hG4bK1022997293 From: "goip_1" ;tag=1026279117 To: Call-ID: [email protected] CSeq: 1379 MESSAGE Contact: Max-Forwards: 30 User-Agent: dble Content-Type: text/plain Content-Length: 26 Message Body Line-based text data: text/plain +17879252226\n Testing Goip\n

No. Time Source Destination Protocol Length Info
28 19.206071000 192.168.1.200 192.168.1.104 SIP 558 Status: 401 Unauthorized |

Frame 28: 558 bytes on wire (4464 bits), 558 bytes captured (4464 bits) on interface 0
Ethernet II, Src: Elitegro_a7:1c:c6 (00:1b:b9:a7:1c:c6), Dst: DblTechn_01:d3:1c (38:3f:10:01:d3:1c)
Internet Protocol Version 4, Src: 192.168.1.200 (192.168.1.200), Dst: 192.168.1.104 (192.168.1.104)
User Datagram Protocol, Src Port: x11 (6050), Dst Port: x11 (6050)
Session Initiation Protocol (401)
Status-Line: SIP/2.0 401 Unauthorized
Status-Code: 401
[Resent Packet: False]
[Request Frame: 27]
[Response Time (ms): 0]
Message Header
Via: SIP/2.0/UDP 192.168.1.104:6050;branch=z9hG4bK1022997293;received=192.168.1.104;rport=6050
From: “goip_1” sip:[email protected];tag=1026279117
To: sip:[email protected];tag=as233d34e3
Call-ID: [email protected]
CSeq: 1379 MESSAGE
Server: FPBX-2.11.0(11.8.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="4c999911"
Content-Length: 0

goip_1 refers to the Incomming settings in the trunk:

secret=XXXXXXX
dtmfmode=rfc2833
canreinvite=no
context=from-internal
host=dynamic
type=friend
qualify=yes

I have configured sip_general_additional.conf with the outofcall parameters I believe are required for MESSAGES to work. SInce I read some controversy as to whether the correct parameter is accept_outofcall_messages or accept_outofcall_message, I have included both:

accept_outofcall_messages=yes accept_outofcall_message=yes outofcall_message_context=sms_message

and finally here is my configuration for the receiving custom extension:

[sms_message]
exten => 1222,1,Answer()
same => n,NoOp() ;Receiveing SMS Msg from GoIP
same => n,Set(SMSINRAW=${MESSAGE(body)})
same => n,Set(SMSIN=${URIENCODE(${SMSINRAW})})
same => n,Verbose(0,"SMSIN: "${SMSIN})
same => n,Hangup()

Any suggestions would be greatly appreciated.
Carlos

There is extensive information on the GoIP device including SMS config here:
http://nerdvittles.com/?p=7581

Thanks lgaetz, yes I have been using that posting among others as the basis for my install. I do not have PIAF installed so as Ward says: I have been reading between the lines.
At any rate, I just found the solution: besides the Sip settings specified by Ward in his article:

accept_outofcall_message=yes
outofcall_message_context=sms_message

I also needed the following to make it work:

auth_message_requests=no

Asterisk still does not specify MESSAGE among its options but it responds with a SIP STATUS: 202 ACCEPTED message and the message is properly relayed to the extension specified in my dialplan.
Thanks

Any solution for Grandstream?

This isn’t an issue with an extension, so there’s never going to be a solution for Grandstream, and the post is four years old and is referring to an old Asterisk version. If you have a question, ask it in a new post and provide details.

1 Like

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