How to route more than one DID number through trunk


#1

Hi,

I have a asterisk server that works well but I have registered another DID number for another client at my SIP provider and I want them to use the same trunk for incoming and outgoing calls as I have been using.

What should I do to make their calls go out and also receive calls over that trunk?

Thank you in advance.


#2

Ensure that the provider sends the incoming line number in the request URI. Ensure that they allow you to provide a (vetted) user provided caller ID.


#3

Hi David,

Thank you for replying, I will ask them to make that changes thanks. I also have my trunk set to my one extension number so it only rings that number if someone calls in.

here is some output from my server.

[tn_sip_trunk]
type=friend
context=tn_sip_trunk
secret=xxxxxxxxxxxx
qualify=yes
nat=force_rport,comedia
insecure=invite
host=xxxxxxxx
fromdomain=xxxxxxx
disallow=all
defaultuser=xxxxxxxxxx
allow=g726,gsm,ulaw,alaw

;Outgoing SIP trunk
[tn_sip_trunk]
exten => _X.,1,Goto(Tribal_Networks,101,1)
same => s,n,Goto(Tribal_Networks,101,1)

how should I configure this so that it knows where to send the call to depending on what DID gets phoned from the outside? I know the “101” should be removed but don’t know how the rule should look to make it work. perhaps a variable ?

Thank you in advance.


#4

Provide Asterisk extensions that match the incoming number as it is represented in the user part of the request URI. This assumes you have succeeded in doing:

Ensure that the provider sends the incoming line number in the request URI

otherwise you will have to tell us how one would determinate the direct in dialling number from the contents of the SIP INVITE actually sent by the provider.


#5

Hi David,

Thanks I came right, I made some changes to my routes and can get calls for both DID’s

Regards.