How do you handle multiple inbound routes differently?


#1

I have setup 2 inbound routes with the same SIP provider, each has their own seperate login/password. They are both accepting calls, however the 2nd inbound route I have added does not take the settings I give it. I am trying to get it to go to a ring group, but it just picks up the IVR set for the first inbound route instead.

Is there something special that needs to be setup for multiple inbound route management? Any suggestions are appreciated… thanks


#2

are they both using the same context?


#3

No, they are unique DIDs


#4

I think in the sip.conf file where you set up the accounts Context = put the second one in a different context then in the dialplan create a context for it and route to what you want to do


#5

That doesnt exclude using the same CONTEXT

Simply let both accounts spawn in the same context.
eg:
context=incoming

in the corr. SIP.CONF section.

If you want to handle them different, simply spawn them in a diff. context, dont include the “other” context and re-define the extension different there.


#6

Oh ok, I was just in FreePBX… I’m not sure about this…

my sip.conf shows the following context;
context = from-sip-external

sip_additional.conf shows the same context for both Trunks;
context=custom-axvoice

Not sure if you wanted me to change my sip.conf so I tried changing the sip.conf context to
context=incoming
but had the same result, both inbounds follow the same setting.


#7

I have created 2 context’s in the extensions_custom.conf;

[custom-axvoice]
exten => s,1,NoOp(Axvoice incoming call)
exten => s,2,Goto(ext-did,FIRSTNUMBER,1)

[custom-axvoiceLD]
exten => s,1,NoOp(Axvoice incoming call)
exten => s,2,Goto(ext-did,SECONDNUMBER,1)

Then pointed the first inbound context within the sip_additional.conf to
context=custom-axvoice and the second to context=custom-axvoiceLD

FIRSTNUMBER is set to play IVR
SECONDNUMBER is set to dial extension 259 directly

At this point both now use the SECONDNUMBER settings and dial straight to 259 rather then both playing the IVR like before. Am I on the right track here with this?


#8

Mind to post the relevant confs please ?


#9

I must be confused. FreePBX allows you to define multiple inbound DIDs without jumping thru all those hoops. Have you tried that? Or are you needing something that clashes with the FreePBX inbound routing screen?


#10

pastebin.com/706001
and
pastebin.com/706079
thanks


#11

I did try it, but the inbound routes go to the primary route, the second one I added is ignored for some reason…


#12

if you are using AAH, you should never be editing _additional.conf files (or the basic xxx.conf files either.) i think the trick here is in the inbound routes screen, at the bottom, you can specify a “custom app”, which is really just a context name (although it has to follow certain conventions). you then put those contexts in your extensions_custom.conf file and go from there…


#13

Yes I understand the process of setting them up, I am here because they do not work :<


#14

These are the 2 inbound routes, it should be this simple no? But both go to the setting on the left.

[/img]


#15

not to be snide, but if you really understood how AAH worked, you would not be editing files that are overwritten by AAH :frowning: anyway, without any tweaks by you, what does the extensions_additional.conf look like? specifically, the (contexts for the two DIDs?)


#16

I don’t see any contexts for the two DIDs, here is the extensions_additional.conf
pastebin.com/706507


#17

I was watching the CLI and when calling #2, the DID shows up as #1? What would cause this? I even deleted #1 and it still shows up, the number wont remove itself from extensions_additional.conf


#18

this is weird. sorry, i misspoke. i didn’t mean contexts. anyway, looking at this:

exten => xxxxx,1,Set(FROM_DID=1NNNNNNNNNN)

exten => xxxxx,n,Goto(ivr-5,s,1)

exten => xxxxx,1,Set(FROM_DID=1MMMMMMMMMM)

exten => xxxxx,n,Goto(ext-group,2,1)

exten => s,1,Noop(No DID or CID Match)

sure looks like it should have worked. what shows up in /var/log/asterisk/full for each DID when a call comes in?


#19

when you say “shows up as #1” it says that’s the DID? i wonder if your provider screwed up?


#20

Very weird… here is the 206 # log;

May 8 22:11:24 VERBOSE[9382] logger.c: – Executing NoOp(“SIP/fpilatoax2-e653”, “Axvoice incoming call”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Goto(“SIP/fpilatoax2-e653”, “ext-did|12067897898|1”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Goto (ext-did,12067897898,1)
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Set(“SIP/fpilatoax2-e653”, “FROM_DID=12067897898”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Goto(“SIP/fpilatoax2-e653”, “ivr-5|s|1”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Goto (ivr-5,s,1)
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Set(“SIP/fpilatoax2-e653”, “LOOPCOUNT=0”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Set(“SIP/fpilatoax2-e653”, “__DIR-CONTEXT=default”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Answer(“SIP/fpilatoax2-e653”, “”) in new stack
May 8 22:11:24 VERBOSE[9382] logger.c: – Executing Wait(“SIP/fpilatoax2-e653”, “1”) in new stack
May 8 22:11:24 DEBUG[2597] chan_sip.c: Stopping retransmission on ‘4032c6d945f4b1ca51f9dda744b25bdc@216.143.130.112’ of Response 102: Match Found
May 8 22:11:25 VERBOSE[9382] logger.c: – Executing Set(“SIP/fpilatoax2-e653”, “TIMEOUT(digit)=3”) in new stack
May 8 22:11:25 VERBOSE[9382] logger.c: – Digit timeout set to 3
May 8 22:11:25 VERBOSE[9382] logger.c: – Executing Set(“SIP/fpilatoax2-e653”, “TIMEOUT(response)=10”) in new stack
May 8 22:11:25 VERBOSE[9382] logger.c: – Response timeout set to 10
May 8 22:11:25 VERBOSE[9382] logger.c: – Executing BackGround(“SIP/fpilatoax2-e653”, “custom/11st”) in new stack
May 8 22:11:25 DEBUG[9382] channel.c: Scheduling timer at 160 sample intervals
May 8 22:11:25 VERBOSE[9382] logger.c: – Playing ‘custom/11st’ (language ‘en’)
May 8 22:11:30 DEBUG[9382] channel.c: Scheduling timer at 0 sample intervals
May 8 22:11:30 VERBOSE[9382] logger.c: == Spawn extension (ivr-5, s, 7) exited non-zero on 'SIP/fpilatoax2-e653’
May 8 22:11:30 VERBOSE[9382] logger.c: – Executing Hangup(“SIP/fpilatoax2-e653”, “”) in new stack
May 8 22:11:30 VERBOSE[9382] logger.c: == Spawn extension (ivr-5, h, 1) exited non-zero on ‘SIP/fpilatoax2-e653’

Here is the 250 # log;

May 8 22:13:22 VERBOSE[9407] logger.c: – Executing NoOp(“SIP/fpilatoax2-5afb”, “Axvoice incoming call”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Goto(“SIP/fpilatoax2-5afb”, “ext-did|12067897898|1”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Goto (ext-did,12067897898,1)
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Set(“SIP/fpilatoax2-5afb”, “FROM_DID=12067897898”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Goto(“SIP/fpilatoax2-5afb”, “ivr-5|s|1”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Goto (ivr-5,s,1)
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Set(“SIP/fpilatoax2-5afb”, “LOOPCOUNT=0”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Set(“SIP/fpilatoax2-5afb”, “__DIR-CONTEXT=default”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Answer(“SIP/fpilatoax2-5afb”, “”) in new stack
May 8 22:13:22 VERBOSE[9407] logger.c: – Executing Wait(“SIP/fpilatoax2-5afb”, “1”) in new stack
May 8 22:13:23 DEBUG[2597] chan_sip.c: Stopping retransmission on ‘69ed27927e5a9c8539b14963253a808d@216.143.130.93’ of Response 102: Match Found
May 8 22:13:23 VERBOSE[9407] logger.c: – Executing Set(“SIP/fpilatoax2-5afb”, “TIMEOUT(digit)=3”) in new stack
May 8 22:13:23 VERBOSE[9407] logger.c: – Digit timeout set to 3
May 8 22:13:23 VERBOSE[9407] logger.c: – Executing Set(“SIP/fpilatoax2-5afb”, “TIMEOUT(response)=10”) in new stack
May 8 22:13:23 VERBOSE[9407] logger.c: – Response timeout set to 10
May 8 22:13:23 VERBOSE[9407] logger.c: – Executing BackGround(“SIP/fpilatoax2-5afb”, “custom/11st”) in new stack
May 8 22:13:23 DEBUG[9407] channel.c: Scheduling timer at 160 sample intervals
May 8 22:13:23 VERBOSE[9407] logger.c: – Playing ‘custom/11st’ (language ‘en’)

Could this be something set at axvoice that does not allow me to use 2 seperate numbers?