[asterisk-users] context problem
Jonas Kellens
jonas.kellens at telenet.be
Thu Jan 20 10:39:02 CST 2011
On 01/20/2011 05:23 PM, Jeroen Eeuwes wrote:
> Hi Jonas,
>
>
>> What else can I try ?
>>
> Yeah, Asterisk always assumes that from 1 ip address there can only be
> inbound number. Not very user-friendly.
>
> I think I've used something like this:
>
> exten => s,1,Set(CALL-TO=${SIP_HEADER(TO)})
> exten => s,n,Set(CALL-FROM=${CALLERIDNUM})
> exten => s,n,GotoIf($["${CALL-TO}" : ".*52525252.*"]?TRUNKin,52525252,1)
> exten => s,n,GotoIf($["${CALL-TO}" : ".*59595959.*"]?TRUNKin,59595959,1)
> exten => s,n,etcetera
>
> Best regards,
> Jeroen Eeuwes
>
> --
Hello,
this is the result when using your config :
[Jan 20 17:33:50] -- Executing [s at TRUNKin:1]
NoOp("SIP/119909-000006d7", "context TRUNKin - s") in new stack
[Jan 20 17:33:50] -- Executing [s at TRUNKin:2]
NoOp("SIP/119909-000006d7", ""775006" <775006>") in new stack
[Jan 20 17:33:50] -- Executing [s at TRUNKin:3]
NoOp("SIP/119909-000006d7", ""775006" <775006>") in new stack
[Jan 20 17:33:50] -- Executing [s at TRUNKin:4]
NoOp("SIP/119909-000006d7", "<sip:s at 11.11.12.112>") in new stack
[Jan 20 17:33:50] -- Executing [s at TRUNKin:5]
NoOp("SIP/119909-000006d7", "") in new stack
[Jan 20 17:33:50] -- Executing [s at TRUNKin:6]
NoOp("SIP/119909-000006d7", "775006") in new stack
dialplan :
exten => s,1,NoOp(context TRUNKin - s)
exten => s,n,NoOp(${CALLERID(all)})
exten => s,n,NoOp(${CALLERID(all)})
exten => s,n,NoOp(${SIP_HEADER(TO)})
exten => s,n,NoOp(${CALLERIDNUM})
exten => s,n,NoOp(${CALLERID(num)})
Kind regards,
Jonas.
More information about the asterisk-users
mailing list