In article <[EMAIL PROTECTED]>,
Tomasz Zieleniewski <[EMAIL PROTECTED]> wrote:
> 
> I have the following situation.
> I have one account created in my VoIP provider.
> Asterisk registers this account with the usage of
> 'register = ' command in the sip.conf file.
> I have a number of aliases assigned to my user which
> correspond to different public/PSTN numbers through which I am
> accessible. When there is an incoming call from my sip provider
> 'some_extension' which corresponds to my registered user 'rings'.
> this is because of such registration:
> register => user:[EMAIL PROTECTED]/some_extension.
> How can I now evaluate the value of the To header and perform
> further routing logic.
> What will happen if I don't specify the /extension value in the
> register command?

I think it sill use the 's' extension in your incoming context.

> Will it in such situation analyze the 'To' header to find matching extension??

Asterisk never uses the To header itself, expect to set the variable
SIP_HEADER(TO).

You can extract the number from the To header like this:

exten => some_extension,1,Set(DEST=${CUT(CUT(SIP_HEADER(TO),:,2),@,1)})

And then use ${DEST} in some way to route the call.

Cheers
Tony
-- 
Tony Mountifield
Work: [EMAIL PROTECTED] - http://www.softins.co.uk
Play: [EMAIL PROTECTED] - http://tony.mountifield.org

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to