Setup DID
Hi I am trying to setup DDI for one of our servers Our Provider has given us one DDI for use for eg 0800111111. On my main server A, I use an IAX trunk to connect to Client Server B.When calls come in from the outside world on main server A for 0800111111In the dial plan, I pattern match and connect with IAX2 truck named 087XXXXXX
eg) SERVER A DIALPLANexten => 0800111111,1, Verbose( 3, ” **** INCOMING CALLS SERVER B ****)same => n,Dial(IAX2/087XXXXXX,,r)
On server B I have an incoming context in which I have both a general IVR and the 0800111111 patternto route the DDI number to a particular extension.
[incoming]
exten =>0800111111.,1,Answer()same => n,Dial(PJSIP/200)same => n,Hangup()
exten => s,1,Answer()same => n,Goto(main_ivr,7777,1)same => n,Hangup()
I cant seem to get a match on 087, it always go to the s context in incomingAny ideas on how I can get DDI to work thanks Zakir
2 thoughts on - Setup DID
You would need to explicitly defined the registration string / DDI, else it will always take the s precedence.
Thanks, Feroz Ahmed
This probably is related to the format in which one server is presenting the extension to the other server, and your extension definition(s) not matching that format. (For instance, something could be stripping the leading zero from the STD code.) So you need to find out exactly what the far end is sending the number to you like, so you can make sure your extensions match.
In the “s” extension in your [incoming] context, put a line like
exten => s,n,NoOp(Dialled extension is “${EXTEN}”)
Dial through to the first server, and watch the console on the second server to make sure the call comes through. Note the format in which the extension is presented, and make sure your extension definitions match that.
Also, do not forget, “wildcard” extensions which can match more than one thing must begin with an underscore; e.g.
exten => _3xx,1,NoOp(Call to “${EXTEN}” on B site)
exten => _3xx,n,Dial(${BSITE}/${EXTEN})
exten => _3xx,n,Hangup()
Even although there be characters in the extension name which will mark it out as an obvious wildcard, Asterisk still expects for there to be an _ at the beginning in order to treat it as such.