How to route more than one DID number through trunk


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.

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.

1 Like

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.


;Outgoing 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.

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.

Hi David,

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