Hi Guys,
I Have this peers on my sip.conf
[provider-302333-3000]
type=friend
context=provider
secret=xpto
username=3023333000
host=sip.provider.com
fromuser=3023333000
insecure=very
canreinvite=no
[provider-302222-3001]
type=friend
context=provider
secret=xpto
username=3022223001
host=sip.provider.com
fromuser=3022223001
insecure=very
canreinvite=no
I Have in my sip.conf two extension 3000 and 3001.
I have this rule in my extensions.conf
exten=> _X.,1,Dial(SIP/[EMAIL PROTECTED](num)},60,Tt)
exten=> _X.,2,Hangup
exten=> _X.,1,Dial(SIP/[EMAIL PROTECTED](num)},60,Tt)
exten=> _X.,2,Hangup
And every calls made by my both extension was using the first rule, so
calls from extension 3000 match with peer and work, but calls from
3001 didn't match with peer and I got error.
How can I use a conditional sentence like:
if {${CALLERID(num)}=3000)
{
exten=> _X.,1,Dial(SIP/[EMAIL PROTECTED](num)},60,Tt)
exten=> _X.,2,Hangup
}
else
if {${CALLERID(num)}=3001)
{
exten=> _X.,1,Dial(SIP/[EMAIL PROTECTED](num)},60,Tt)
exten=> _X.,2,Hangup
}
Thanks.
--
Frederico Madeira
[EMAIL PROTECTED]
www.madeira.eng.br
_______________________________________________
--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