[asterisk-users] context problem

Andrew Thomas andy at datavox.co.uk
Thu Jan 20 10:51:53 CST 2011


I always thought the last bit (after the /) is where the context in
sip.conf landed.

What about:

(sip.conf)

register => 119909:passwd at sip.prov.org/52525252
register => 119909:passwd at sip.prov.org/59595959

[52525252]
...
context = TRUNKin52
...

[59595959]
...
context = TRUNKin59
...
	
And split them out in extensions.conf?

I have a suspicion that you have 'context=TRUNKin' under the '[default]'
section of sip.conf - which is why they are hitting there in the first
place.

Then again, I have been known to be wrong ;)




-----Original Message-----
From: asterisk-users-bounces at lists.digium.com
[mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jonas
Kellens
Sent: 20 January 2011 16:39
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] context problem


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.

-- _____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
               http://www.asterisk.org/hello

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


 If you have received this communication in error we would appreciate
you advising us either by telephone or return of e-mail. The contents
of this message, and any attachments, are the property of DataVox,
and are intended for the confidential use of the named recipient only.
If you are not the intended recipient, employee or agent responsible
for delivery of this message to the intended recipient, take note that
any dissemination, distribution or copying of this communication and
its attachments is strictly prohibited, and may be subject to civil or
criminal action for which you may be liable.
Every effort has been made to ensure that this e-mail or any attachments
are free from viruses. While the company has taken every reasonable
precaution to minimise this risk, neither company, nor the sender can
accept liability for any damage which you sustain as a result of viruses.
It is recommended that you should carry out your own virus checks
before opening any attachments. 

Registered in England. No. 27459085.





More information about the asterisk-users mailing list