[Resolved] Multiple Phone Numbers - Same DID

I realize that the subject of this thread is missleading, but I dont know how better to explain it. I use CallCentric as my VoIP provider and when I configure a Trunk, I have to use my “account number” as my DID, however the account number is not a phone number.

In fact, I can have as many phone numbers as I like but they all use the same “account” DID when configuring FreePBX.

My problem is this.
I want ONE of the numbers to go to IVR and I want ONE of the numbers to ring directly to an extension. Does anybody have any experience with this? I could really use the help.

If you choose ‘Inbound Call Control’ and ‘Inbound Routes’ you can configure each DID to go to the destination of your choice.

Make sure you leave the CID blank so it works from any Caller ID.

Scott

The problem is that the DID number is simply my CallCentric account number. The phone numbers are separate and if I use the phone number in the DID field, FreePBX barfs. I HAVE to use the account number in the DID.

Here is what they have for me.

http://www.callcentric.com/support/device/trixbox
http://www.callcentric.com/dev_01.php?type=4

I followed the link and found this bit of advice, makes sense to me.

You should also take a look at the Asterisk debug and SIP debug output so you can understand what they are sending you:

[i]In trixbox configure an inbound route with your 1777 number as the DID Number and the Caller ID Number as blank. For example:

1777MYCCID / any CID

Set the destination for these inbound calls to Custom App with a value of incoming,s,1. [/i]

Scott

I know… makes no sense to me either.

No I said it makes sense to me, that should work fine.

Scott

I am using 1777MYCCID as the DID, BUT, I dont know how to route separate phone numbers around.
I can’t create two Trunks because they would both have to use 1777MYCCID on the inbound Route anyways.
I can’t create two Inbound Routes because they are both set to use 1777MYCCID

I can’t find where I would specifiy the actual “phone number” within the inbound route.

What about this part -

how would I do that? where is “custom app”

Ok, I read this wrong at first, ignore needing to use the custom Asterisk extension.

Have you done those captures, it would be useful to see what the actual incoming DID info looks like.

From reading the call centric instructions it looks like you should simply have to add 177 to your DID # IE 1772125551212

If you set Anonymous SIP on and then watch the debug info in the Asterisk CLI you should see the call come in. Then you can route it properly.

Scott

Thanks for that. I will watch the next incoming call.
To watch the call, do I just use

CLI>asterisk -r

CLI = Command Line Interface

The command prompt or shell prompt is where you access the Asterisk CLI. So use your favirote SSH client to access the Linux shell then execute asterisk -rvvvvvv (the v’s set verbose mode). Call the inbound number and you will see quite a bit of data. Look for a line that contains the inbound phone number or incoming call.

Scott

– Executing [17772830194@from-pstn:1] Set(“SIP/17772830194-b7600468”, “_FR OM_DID=17772830194") in new stack
– Executing [17772830194@from-pstn:2] Gosub(“SIP/17772830194-b7600468”, “ap p-blacklist-check|s|1”) in new stack
– Executing [s@app-blacklist-check:1] LookupBlacklist(“SIP/17772830194-b760 0468”, “”) in new stack
– Executing [s@app-blacklist-check:2] GotoIf(“SIP/17772830194-b7600468”, “0 ?blacklisted”) in new stack
– Executing [s@app-blacklist-check:3] Return(“SIP/17772830194-b7600468”, “” ) in new stack
– Executing [17772830194@from-pstn:3] GotoIf(“SIP/17772830194-b7600468”, “0 ?cidok”) in new stack
– Executing [17772830194@from-pstn:4] Set(“SIP/17772830194-b7600468”, “CALL ERID(name)=12506498160”) in new stack
– Executing [17772830194@from-pstn:5] NoOp(“SIP/17772830194-b7600468”, “Cal lerID is “12506498160” <12506498160>”) in new stack
– Executing [17772830194@from-pstn:6] Set(“SIP/17772830194-b7600468”, "FAX
RX=disabled”) in new stack
– Executing [17772830194@from-pstn:7] Set(“SIP/17772830194-b7600468”, “__CA LLINGPRES_SV=allowed_not_screened”) in new stack
– Executing [17772830194@from-pstn:8] SetCallerPres(“SIP/17772830194-b76004 68”, “allowed_not_screened”) in new stack
– Executing [17772830194@from-pstn:9] Goto(“SIP/17772830194-b7600468”, “tim econditions|1|1”) in new stack
– Goto (timeconditions,1,1)
– Executing [1@timeconditions:1] GotoIfTime(“SIP/17772830194-b7600468”, “09 :00-04:00|mon-fri|1-31|jan-dec?ivr-4|s|1”) in new stack
– Executing [1@timeconditions:2] Goto(“SIP/17772830194-b7600468”, “ivr-5|s| 1”) in new stack
– Goto (ivr-5,s,1)
– Executing [s@ivr-5:1] Set(“SIP/17772830194-b7600468”, “LOOPCOUNT=0”) in n ew stack
– Executing [s@ivr-5:2] Set(“SIP/17772830194-b7600468”, “__DIR-CONTEXT=defa ult”) in new stack
– Executing [s@ivr-5:3] Set(“SIP/17772830194-b7600468”, “_IVR_CONTEXT_ivr-5 =”) in new stack
– Executing [s@ivr-5:4] Set(“SIP/17772830194-b7600468”, "_IVR_CONTEXT=ivr-5 ") in new stack
– Executing [s@ivr-5:5] GotoIf(“SIP/17772830194-b7600468”, “0?begin”) in ne w stack
– Executing [s@ivr-5:6] Answer(“SIP/17772830194-b7600468”, “”) in new stack
– Executing [s@ivr-5:7] Wait(“SIP/17772830194-b7600468”, “1”) in new stack
– Executing [s@ivr-5:8] Set(“SIP/17772830194-b7600468”, “TIMEOUT(digit)=3”) in new stack
– Digit timeout set to 3
– Executing [s@ivr-5:9] Set(“SIP/17772830194-b7600468”, “TIMEOUT(response)= 10”) in new stack
– Response timeout set to 10
– Executing [s@ivr-5:10] BackGround(“SIP/17772830194-b7600468”, “custom/Inf initas_Closed”) in new stack
– <SIP/17772830194-b7600468> Playing ‘custom/Infinitas_Closed’ (language ‘e n’)
== Spawn extension (ivr-5, s, 10) exited non-zero on 'SIP/17772830194-b7600468 '
– Executing [h@ivr-5:1] Hangup(“SIP/17772830194-b7600468”, “”) in new stack
== Spawn extension (ivr-5, h, 1) exited non-zero on ‘SIP/17772830194-b7600468’

What happens when you try and route on that number?

Looks like I got my answer from CallCentric finally.

Hello,

To address your concern, if you would like to route a specific call to a specific IVR, then if you would, please perform the following in order to do so.

Within your extensions_custom.conf file please use the following incoming context:

[incoming]
exten => s,1,Set(Var_TO=${SIP_HEADER(TO)})
exten => s,2,GotoIf($["${Var_TO}" = “sip:[email protected]”]?extension1,s,1:3)
exten => s,3,GotoIf($["${Var_TO}" = “sip:[email protected]”]?ext-did,1403xxxxxxx,1:4)
exten => s,4,GotoIf($["${Var_TO}" = “sip:[email protected]”]?ext-did,1778xxxxxxx,1:5)
exten => h,5,Macro(hangupcall)

Next, from your FreePBX interface, please visit the inbound routes configuration page and create a new inbound route. Locate the setting ‘DID Number’ and enter in your 17772733849 number. Route this inbound call to the custom application ‘incoming,s,1’ (without the quotes).

Once you have done so, please create a new inbound route for each number, (such as 1403xxxxxxx and 1778xxxxxxx) and route those inbound calls to the specific IVR in which you would like to route your inbound calls to. Should you experience any issues then please upload a copy of your exntesions_custom.conf file as well as a screenshot of your inbound routes page within your FreePBX interface.

If you do experience any issues, please let us know.

Thanks for all your help… I am going to try the above mentioned tomorrow.

The answer from CallCentric did the trick.
Thanks for all the help

I have multiple DID’s coming on one zaptel channel, so in the inbound routes i write the number of the zaptel channel in the zaptel channel box and then i need to define a custom context to direct every DID to a unique extension.

Can anybody walk me through how to config the custom context? or is there another way to do it without it ??

You are sort of hijacking this thread. It would be better to post a new one.

You’ve not said what kind of card you have (T1/PR I’m guessing) but here is a partial answer. When a call comes in under a T1/PRI the DID will be set so that the program knows what number it came in one even though the Zap device can have multiple different aswers at any given time. What you need to do is know the number of digits that your provider provides to you. on our PRI we get the last 4. So when I create a extension I put the last 4 digits into the DID field and all calls to that number will then be routed to that extension automatically.