[asterisk-users] multiple sip trunks
David Gibbons
dave at videon-central.com
Mon Dec 14 07:55:12 CST 2009
<snip>
I have multiple trunks to the same ITSP. Incoming calls to any trunk
go to the last "incoming" label defined in those trunks' contexts in
sip.conf.
My ITSP insists on insecure=very in the trunk context; is this the cause?
</snip>
Your provider is probably sending the DID in the SIP header TO: field. This was discussed on the list last week to at a reasonable level of detail but generally speaking, you want to dump all of the calls into a context like [FromSIP] and then have all calls parsed based on the to: field with something like this:
(credit for this goes to someone at asterisk-info.org, but I didn't write down who...)
[FromSIP]
;DIDs
exten => 8885550000,1,Dial(SIP/EXTENSION,10)
;parser
exten => i,1,Goto(FromSIP|s|1)
exten => s,1,Set(calldest=${CUT(CUT(SIP_HEADER(To),@,1),:,2)})
exten => s,n,Goto(FromSIP|${calldest:1}|1)
Then you can set up an exten for each incoming DID that will handle the calls directly within this same context. Turn on sip debugging and high verbosity at the cli to help yourself see what's going on with this...
-Dave
More information about the asterisk-users
mailing list