[Asterisk-Users] AMP and custom application

pellegrini at frameweb.it pellegrini at frameweb.it
Tue Jun 7 07:16:40 MST 2005


OK, I found the solution

custom-did-route,${EXTEN},1

the "call" to the custom application has to be done in this way

Now I am happy, becouse with only one line in extensions_custom.conf and 1
DID Route in AMP I can
route all of the external extensions (01012345xx) to the internal
extensions (5xx)

thanks all



                                                                           
             pellegrini at framew                                             
             eb.it                                                         
             Sent by:                                                   To 
             asterisk-users-bo         Moises Silva                        
             unces at lists.digiu         <moises.silva at gmail.com>, Asterisk  
             m.com                     Users Mailing List - Non-Commercial 
                                       Discussion                          
                                       <asterisk-users at lists.digium.com>   
             07/06/2005 10.22                                           cc 
                                                                           
                                                                   Subject 
             Please respond to         Re: [Asterisk-Users] AMP and custom 
              Asterisk Users           application                         
              Mailing List -                                               
              Non-Commercial                                               
                Discussion                                                 
             <asterisk-users at l                                             
             ists.digium.com>                                              
                                                                           
                                                                           




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:7}@default,${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
             <moises.silva at gma
             il.com>                                                    To
             Sent by:                  Asterisk Users Mailing List -
             asterisk-users-bo         Non-Commercial Discussion
             unces at lists.digiu         <asterisk-users at lists.digium.com>
             m.com                                                      cc

                                                                   Subject
             06/06/2005 17.17          Re: [Asterisk-Users] AMP and custom
                                       application

             Please respond to
               Moises Silva
             <moises.silva at gma
              il.com>; Please
                respond to
              Asterisk Users
              Mailing List -
              Non-Commercial
                Discussion
             <asterisk-users at l
             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,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
"
_______________________________________________
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





_______________________________________________
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







More information about the asterisk-users mailing list