# How to route more than one DID number through trunk

**URL:** <https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278>\
**Category:** Asterisk Support\
**Created:** [April 13, 2018, 10:37pm UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278 "2018-04-13T22:37:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tn001](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@tn001](https://community.asterisk.org/u/tn001)\
**Post date:** [April 13, 2018, 10:37pm UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278/1 "2018-04-13T22:37:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [April 13, 2018, 10:50pm UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278/2 "2018-04-13T22:50:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tn001](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@tn001](https://community.asterisk.org/u/tn001)\
**Post date:** [April 13, 2018, 11:14pm UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278/3 "2018-04-13T23:14:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![david551](https://avatars.discourse-cdn.com/v4/letter/d/3bc359/32.png) [@david551](https://community.asterisk.org/u/david551)\
**Post date:** [April 14, 2018, 8:48am UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278/4 "2018-04-14T08:48:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tn001](https://avatars.discourse-cdn.com/v4/letter/t/b3f665/32.png) [@tn001](https://community.asterisk.org/u/tn001)\
**Post date:** [April 14, 2018, 12:50pm UTC](https://community.asterisk.org/t/how-to-route-more-than-one-did-number-through-trunk/74278/5 "2018-04-14T12:50:54Z")

</div>

Hi David,

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

Regards.
