[Asterisk-Users] AMP and custom application

Moises Silva moises.silva at gmail.com
Mon Jun 6 08:17:09 MST 2005


you are right, the problem is that the 's' extension is always
executed first. You have to set a pattern to catch the number that you
want, as you did in the seconth rule in your custom-did-route context.
So, depending on how the number is sent by your DID provider, you can
do:

[custom-did-route]
include => exten567 ; this for the 567 extension did
include => genericdid ; this for all the rest

[exten567]
exten => 0101234567, 1, Macro(exten-vm,567 at default,567)

[genericdid]
exten => _0101234XXX,1,Macro(exten-vm,${EXTEN:7}@default,${EXTEN:7})


finally im not sure what you intented to do with the third extension
rule. So i only put 2 includes. The includes are necessary to
determine the order in wich the extensions are matched, the genericdid
pattern "conflicts" with exten567 pattern, so the more generic one
would be matched if both are directly included in custom-did-route, in
order to you decide wich one is first matched you have to use include
=>

i hope it helps you.

best regards

On 6/6/05, pellegrini at frameweb.it <pellegrini at frameweb.it> wrote:
> 
> Hi,
> I am trying to define DID Routes via AMP (last version 1.10.008)
> I succeded in defining single DID route, one per extension, let's say i.e.
> 
> DID number 0101234567 set destination to extension 567
> DID number 0101234555 set destination to extension 555
> 
> and so on
> 
> Now I was trying to define only one route to a custom application
> 
> DID number 0101234XXX routes to Custom-App custom-did-route,s,1
> 
> I Defined the [custom-did-route] section in extension_custom.conf
> 
> [custom-did-route]
> ;exten => s,1,Macro(exten-vm,567 at default,567)
> ;exten => _0101234XXX,1,Macro(exten-vm,${EXTEN:7}@default,${EXTEN:7})
> ;exten => s,1,Macro(exten-vm,${EXTEN:7}@default,s)
> 
> Here is the problem: if I enable the first line, extension 567 ring on
> incaming,
> meaning that the custom-route-did is working good.
> 
> But if I try to enable the second or third line, the Macro is called with
> no number.
> Actually the problem is that custom-did-route is reached with "s"
> parameter, not the DID !
> 
> It means, I think, that the routing did rule is wrong
> 
> custom-did-route,s,1
> 
> How can I define the route DID in order to pass the called DID and not the
> letter "s" ?
> 
> thanks in advance,
> 
> Andrea
> 
> 
> Chi ricevesse questa mail per errore e' gentilmente pregato di cancellarla.
> 
> Visitate il sito http://www.frameweb.it
> 
> 
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 


-- 
"Su nombre es GNU/Linux, no solamente Linux, mas info en http://www.gnu.org"



More information about the asterisk-users mailing list