[Asterisk-Dev] Evaluating trailing numbers in extensions.conf

Harald Milz hm at seneca.muc.de
Sun Mar 13 03:23:23 MST 2005


Abhishek Tiwari <abhitiwari at gmail.com> wrote:
> Hi,
>    you can use StripMSD if you are sure of the number of dialled digits.
> or you can use {$EXTEN:-1:1}, where {$EXTEN:a:b} means first b digits

Hmmm - problem is, the called number appears not to be available in
extensions.conf. I've got a SIP regitration like,

register => NNNNNNN:XXXXXX at sipgate.de/sip

and the "sip" extension in extensions.conf doesn't know about the called
number so there's nothing to strip off. Tried that before I wrote my mail
:-) 

> additionally, can have your own variables, just look at
> pbx_retrieve_variable in pbx.c

That would probably be the best solution, but I can't find which internal *
variable holds the called number. There is no such struct member in
ast_channel for example. But chan_sip _must_ know about the called number
because it is chan_sip that outputs the SIP message I posted before. struct
sip_request could be a good bet. Any help is appreciated - this might be
interesting not just for myself... 

-- 
"Gee, Toto, I don't think we are in Kansas anymore."



More information about the asterisk-dev mailing list