Asterisk and Signalwire Trunks

Hey everyone,

Just thought that I would share some config info for anyone else that maybe is having trouble setting up on Signalwire… They have pretty good rates… but I had to bash my head against the wall for a bit before finding all the pieces… so here goes…

First off… what you’ll need in your sip.conf

In the [general] section you’ll need to add your registration string like this:


also in the sip.conf


Then we move on to the extensions.conf

Since signalwire doesn’t just send the DID number through, we need to go take it out of the SIP HEADER…


exten => s,1,Set(HEADER_TO={SIP_HEADER(To)}) ;This saves the sip header into HEADER_TO exten => s,n,Set(CALLED_NUMBER={HEADER_TO:5:12}) ;This gets the DID number part
exten => s,n,Goto(${CALLED_NUMBER:1},1) ;This will send you to where you can handle the DID

exten=>19995551212,1,Dial(SIP/100,20) ;Just an example DID number and where to send it.

Hope this saves someone the headache…



what does the asterisk cli shows, ?

If you do a sip show peers you will see something like this – Don’t mind all my disconnected extensions… at the bottom you’ll see the SIGNALWIRE trunk connected and responding

Name/username Host Dyn Forcerport Comedia ACL Port Status Description

101 (Unspecified) D Auto (No) No 0 UNKNOWN
102 (Unspecified) D Auto (No) No 0 UNKNOWN
103 (Unspecified) D Auto (No) No 0 UNKNOWN
104 (Unspecified) D Auto (No) No 0 UNKNOWN
105 (Unspecified) D Auto (No) No 0 UNKNOWN
106 (Unspecified) D Auto (No) No 0 UNKNOWN
107 (Unspecified) D Auto (No) No 0 UNKNOWN
108 (Unspecified) D Auto (No) No 0 UNKNOWN
109 (Unspecified) D Auto (No) No 0 UNKNOWN
110 (Unspecified) D Auto (No) No 0 UNKNOWN
111 (Unspecified) D Auto (No) No 0 UNKNOWN
113 (Unspecified) D Auto (No) No 0 UNKNOWN
114 (Unspecified) D Auto (No) No 0 UNKNOWN
115 (Unspecified) D Auto (No) No 0 UNKNOWN
116 (Unspecified) D Auto (No) No 0 UNKNOWN
117 (Unspecified) D Auto (No) No 0 UNKNOWN
118 (Unspecified) D Auto (No) No 0 UNKNOWN
SIGNALWIRE/asterisk No No 5060 OK (77 ms)

This is just an example on my test box… With the settings mentioned in my post, I am able to make and receive calls just fine.

Sorry guys, just noticed this won’t let me post the dollar sign in there… was missing a couple of dollar signs in the variables… this is correct now.

It just means the remote peer is replying to the OPTION packet sent by Asterisk and is reachable, but nothing relevant to determine why calls doesnt work

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