please check the code why isnt working...

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

please check the code why isnt working...

Postby hny » Fri Mar 30, 2012 2:10 pm

sip.conf
Code: Select all
[general]
bindarrd=0.0.0.0
port=5060
context=bogon-calls
realm=entropy

[basic-options](!)
dtmfmode=rfc2833
type=friend
[mobile-phone](!,basic-options)
host=dynamic
nat=yes
canreinvite=no
disallow=all
allow=g729
allow=ulaw
allow=alaw

[201](mobile-phone)
username=201
secret=secretpass
callerid=("Kosh @ Mobile" <201>)
context=bogon-calls
mailbox=201@default

[200](mobile-phone)
username=200
secret=pass
callerid=("softphone" <200>)
context=bogon-calls
mailbox=200@default


extensions.conf
Code: Select all
[bogon-calls]
exten => _.,1,Congestion
exten => s,1,Congestion

[mobile-except]
include => ext-sip
exten => _X.,1,Dial(IAX2/122220/${EXTEN})

[ext-sip]
exten => 200,1,Macro(stdexten,200,SIP/200)
exten => 201,1,Macro(stdexten,201,SIP/201)


This code is not working error is shown blow
[Mar 31 00:55:42] NOTICE[1210]: chan_sip.c:20785 handle_request_invite: Call from '201' to extension '200' rejected because extension not found in context 'bogon-calls'.
REGARDS ,
HAROON NASEEM
hny
Newsterisk
 
Posts: 11
Joined: Tue Nov 01, 2011 9:53 am

Re: please check the code why isnt working...

Postby csullivan » Sun Apr 01, 2012 2:06 pm

I'm not certain if this is the cause but "bindaddr" is misspelled in the 2nd line of your sip.conf.
csullivan
Newsterisk
 
Posts: 48
Joined: Wed May 06, 2009 9:51 am

Re: please check the code why isnt working...

Postby omid.mohajerani » Mon Apr 02, 2012 12:13 am

your extensions context in sip.conf is "bogon-calls" but you defined 200 and 201 extension in "ext-sip" context . you should add include ext-sip in bogon-calls context .
omid.mohajerani
Oldsterisk
 
Posts: 110
Joined: Tue Sep 21, 2010 9:28 am

Re: please check the code why isnt working...

Postby david55 » Mon Apr 02, 2012 3:32 am

I think bogon-calls is intended to be a honeypot for unauthorised accesses, although I don't know why just failing as "unknown" isn't good enoogh.
david55
Moves Like Spencer
 
Posts: 7876
Joined: Fri Sep 26, 2008 5:03 am

Re: please check the code why isnt working...

Postby csullivan » Mon Apr 02, 2012 1:51 pm

our extensions context in sip.conf is "bogon-calls" but you defined 200 and 201 extension in "ext-sip" context . you should add include ext-sip in bogon-calls context .


Yes, but it still should hit congestion in bogon-calls. I'd use the i context in ext-sip instead, but I can't see why it wouldn't route to bogon-calls based on what I see here.
csullivan
Newsterisk
 
Posts: 48
Joined: Wed May 06, 2009 9:51 am


Return to Asterisk Support

Who is online

Users browsing this forum: gkeke and 19 guests