Setting up SIP trunk for outgoing autopatch

Hello again everyone! After taking a break for a few months I’m back to playing with my repeaters and telephony integration. I’m trying to setup outgoing autopatch via an SIP provider (in this case VOIPcheap), however I’m hitting a brick wall making the connection work. I’ve setup my dialplan and it seems to work fine and have entered the peer stanza in my sip.conf. The phone attempts to make the call but times out after 30 seconds or so with a busy signal.

Below is what my provider stanza looks like in sip.conf but I’ve tried god knows how many combinations:

[voipcheap]
type=peer
username=XXXX
secret=XXXX
host=sip.voipcheap.com
canreinvite=no
qualify=no
nat=yes
insecure=invite
disallow=all
allow=g726
allow=g729
allow=gsm
trustrpid=yes
sendrpid=yes

Below is what I see at the CLI when I try to make a call via my Polycom IP phone:

-- Executing [17146237122@radio-control:1] Dial("SIP/test_1290-14012940", "SIP/voipcheap/17146237122") in new stack
-- Called voipcheap/17146237122

[Aug 11 00:51:15] NOTICE[18433]: chan_sip.c:2966 auto_congest: Auto-congesting SIP/voipcheap-f4005ca0
– SIP/voipcheap-f4005ca0 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [17146237122@radio-control:2] PlayTones(“SIP/test_1290-14012940”, “congestion”) in new stack
– Executing [17146237122@radio-control:3] Hangup(“SIP/test_1290-14012940”, “”) in new stack
== Spawn extension (radio-control, 17146237122, 3) exited non-zero on ‘SIP/test_1290-14012940’

Anyone have any suggestions to help me out here please???

Did you set-up a registration string in sip.conf with your provider ?
Something like this… (works just like a iax reg string

register => user:passw@sip.voipcheap.com

I’m still a bit of a newbie to the Asterisk software and have seen some conflicting info on this. My understanding from articles I read was that I only needed a registration string if I was receiving call, but this is only for outbound. Additionally, I did try a registration string prior but it would always appear to fail per the CLI. I’ll give it another try as I was originally using the VOIPcheap servers in the U.K. but have signed up for a US based account. Maybe that will make a difference?

It’s ok to be a newb… even those of us that have done it many times forget because we do not do it everyday and it can be/is confusing.

So, without a reg string, dial out only, you can do it but you need to basically reg at the time of making the call in your dial string. (extentions.conf) for you must be a auth user to use the service.

This is not asl/app_rpt stuff, but asterisk stuff so you can use the web for particulars.

Perhaps share with me your stanza for the phone patch in extion.conf and I may be more help.

But if you reg the service, you only need to call on the reg’d outbound stanza for the connection when you need it in your dial string.

exten => s,n,Dial,SIP/voipcheap_out1/${EXTEN}

I know you will have fun with this even though you may pull some hairs getting there.
Adding a sip phone for the home/hamshack will be next… LOL

Let me know where you have progressed.

Thanks for the help Mike. Below is my entry in the dialplan for the VOIPcheap trunk. It’s both in my IAX client and SIP client contexts.

exten => _1NXXNXXXXXX,1,Dial,SIP/voipcheap/${EXTEN}
exten => _1NXXNXXXXXX,n,Playtones(congestion)
exten => _1NXXNXXXXXX,n,Hangup()

I’ve actually ready setup a couple of IP phones on my server. Was really useful recently as I was essentially using one as a base radio while on a family trip out of state. I’ve also managed to configure the autopatch to dial my SIP extensions.

Structured in that way,
You will also need to make sure they can make it though your firewall for inbound and be sure your are not blocking for outbound via port (5060 i assume).

sip.conf
One thing i see missing is context… I may be using a old standard so check yours to be sure…
context=radio-control

insecure=invite - this I think is for newer versions of asterisk than we use in app_rpt
try
insecure=very
and
qualify=yes - This should keep you logged for outbound

Save your original file as a new name first.
Let me know how you make out.

Thanks for the tips. I’ll try it when I get home from work tonight and will let you know. 73s!

No joy I’m afraid. I put your suggested changes into the voipcheap stanza in sip.conf. I also tried adding the registration string and going to qualify=yes but it still fails to register and shows the SIP peer as unreachable. When I remove the registration line and switch to qualify=no It appears to place the call but again goes nowhere and eventually times out.

Below is a screenshot of my CLI during my most recent attempt to dial-out, running the SIP SHOW CHANNELS command periodically.

OK…
let’s try not to assume anything here.
Look in modules.conf be sure needed modules are being loaded

and at least one ‘matching codec’ good on your service…ie
load => format_gsm.so ;
Check with your provider

You are not reg’ing.
user/pass/codec handshake ?

this is all I use

host=xxx.xxx.xxx.xxx
type=peer
context=radio-control
disallow=all
allow=ulaw
nat=yes
canreinvite=yes
insecure=very
dtmfmode=rfc2833
qualify=yes

And this I do reg string.

But of course, that which is described in general are settings that will be used if not circumvented within a stanza.

As a extra note…
check your account and be certain you do not have a simple ‘DID’
and allows full outbound dialing.

Have you manage to make it work ? What did you find ?
(for others benefit)