SIP provider trunk issue

Hello,

I have an account at a SIP provider (smsdiscount.com) and I want it to be used for some international calls in the dial plan.

I made the following configurations:

In sip.conf:

register => myusername:mypassword@sip.smsdiscount.com
[smsdiscount]
type = peer
username = myusername
fromuser = myusername
secret = mypassword
canreinvite = no
insecure = invite,port
host = sip.smsdiscount.com
allow = all
qualify = 0
nat = no
context = default

And in extensions.conf:

exten => _0096311NXXXXXX,1,Dial(SIP/myusername:myusername@sip.smsdiscount.com/${EXTEN})

But when a call is started, I am getting the following in the CLI:

WARNING[8922]: chan_sip.c:3005 create_addr: No such host: sip.smsdiscount.com/00963111234567
WARNING[8922]: app_dial.c:1275 dial_exec_full: Unable to create channel of type ‘SIP’ (cause 20 - Unknown)

and the call is being hung up

Any help?

Haytham

You don’t need to put the host in the Dial command, instead put the host definition from sip.conf.

Instead of:

Dial(SIP/myusername:myusername@sip.smsdiscount.com/${EXTEN})

try:

Dial(SIP/smsdiscount/${EXTEN})

Further to this, try reading through the explanation and examples on this Voip-Info page.

Giles.