4

I wonder if there is a way to send sms messages out from freeswitch box via a gateway just like bridge api in mod sofia for calls.

I can originate and receive calls from a sip provider via an external gateway on freeswitch. Now i need to do the same philosophy for chat using the same gateway.

If not, I would be greateful if you recommend an open source http to sip gateway as an alternative.

Thank you for any help.

Anis Bedhiafi
  • 185
  • 1
  • 5
  • 22

2 Answers2

1

You need to check what messaging protocol (e.g. SIP SIMPLE) is accepted by your remote sms gateway. SIP SIMPLE is supported by Freeswitch out-of-the-box. Then, you can either execute "chat" API command from your dialplan:

<action application="set" data="api_result=${chat(sip|from@sender|to@receiver|${your_text_msg})}"/>

or create a chatplan (see mod_sms for latter) if you require more sophisticated message routing.

1

The answer is indeed using chat application but a follows:

  • Assuming that I have an iptel gateway registered on my FreeSWITCH server "8123456789@iptel.org" and that I have the following user registered on ipetl "sip:811111111@iptel.org"

  • To send an SMS to this user out from FreeSWITCH via the iptel gateway, I can do it from FreeSWITCH console as follows:

chat sip|noreply@mydomain|external/sip:811111111@iptel.org|Hello It's working !

  • Or the api (with ESL for e.g.): api chat sip|noreply@mydomain|external/sip:811111111@iptel.org|Hello It's working !

Of course you can replace the iptel gateway in this example with the gateway that your SIP provider gave you. Make sure that the Gateway supports chat using the SIP SIMPLE protocol.

Anis Bedhiafi
  • 185
  • 1
  • 5
  • 22