Thank you for ypur answer.
The problem is the way I pass the argument to the custom application
I think, but I could be wrong, that only

[custom-did-route]
exten => _0101234XXX,1,Macro(exten-vm,${EXTEN:[EMAIL PROTECTED],${EXTEN:7})

could go correctly... if only the DID colud reach this entry !
In other words, ${EXTEN} is not populated with the DID (my pstn passes all
the number, i.e 01234567)

It is populate with a "s" the letter s !

so the problem must me the way I call the custom application

custom-did-route,s,1

in the AMP configuration

probably I should write something different here, non the letter "s"

sorry if I didn't understand

Andrea



                                                                           
             Moises Silva                                                  
             <[EMAIL PROTECTED]                                             
             il.com>                                                    To 
             Sent by:                  Asterisk Users Mailing List -       
             asterisk-users-bo         Non-Commercial Discussion           
             [EMAIL PROTECTED]         <[email protected]>   
             m.com                                                      cc 
                                                                           
                                                                   Subject 
             06/06/2005 17.17          Re: [Asterisk-Users] AMP and custom 
                                       application                         
                                                                           
             Please respond to                                             
               Moises Silva                                                
             <[EMAIL PROTECTED]                                             
              il.com>; Please                                              
                respond to                                                 
              Asterisk Users                                               
              Mailing List -                                               
              Non-Commercial                                               
                Discussion                                                 
             <[EMAIL PROTECTED]                                             
             ists.digium.com>                                              
                                                                           
                                                                           




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,[EMAIL PROTECTED],567)

[genericdid]
exten => _0101234XXX,1,Macro(exten-vm,${EXTEN:[EMAIL PROTECTED],${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, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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,[EMAIL PROTECTED],567)
> ;exten => _0101234XXX,1,Macro(exten-vm,${EXTEN:[EMAIL PROTECTED],${EXTEN:7})
> ;exten => s,1,Macro(exten-vm,${EXTEN:[EMAIL PROTECTED],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
> [email protected]
> 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
"
_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users





_______________________________________________
Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to