Oguzhan Kayhan
2011-Mar-01 09:04 UTC
[asterisk-users] two questions regarding incoming call
Hello, I want to make an agi script to match incoming DIDs with usernames. I tried to do such entry in incoming trunk. [DID_diddw] include = from-didww [from-didww] exten = 3130XXXXXXX,1,AGI("did.php") exten = 3130XXXXXXX,n,DIAL(SIP/${yup_no},20) but when i run the rule it says chan_sip.c:20152 handle_request_invite: Call from '81.85.224.41' to extension '31301111111' rejected because extension not found in context 'from-didww' Cant I use such agi scripts on incoming calls? PS: exten = 3130XXXXXXX,n,DIAL(SIP/1111) works alone. My second question. I got two incoming trunk sip channels on my server. One of them is as follows. [46.19.209.1] host = 46.19.209.1 type = friend insecure = invite context = from-didww canreinvite=no The other is as follows: [62.180.237.73] host = 62.180.237.73 type = friend insecure = invite context = from-btnet2 canreinvite = no The problem is, i get all calls coming from trunk1(didww) without a problem but, when i receive a call from trunk2(btnet) it tries to authenticate the sip call and denies it. It works only if i allow guest calls. What can be the reason for that? Thank you.
Oguzhan Kayhan
2011-Mar-01 09:48 UTC
[asterisk-users] two questions regarding incoming call
Update, My first question solved already. There was an error on my agi script. But second problem still valid. On Tuesday, March 01, 2011 11:04:50 am Oguzhan Kayhan wrote:> Hello, > I want to make an agi script to match incoming DIDs with usernames. > > I tried to do such entry in incoming trunk. > > [DID_diddw] > include = from-didww > > [from-didww] > exten = 3130XXXXXXX,1,AGI("did.php") > exten = 3130XXXXXXX,n,DIAL(SIP/${yup_no},20) > > > but when i run the rule it says > chan_sip.c:20152 handle_request_invite: Call from '81.85.224.41' to > extension '31301111111' rejected because extension not found in context > 'from-didww' Cant I use such agi scripts on incoming calls? > > PS: > exten = 3130XXXXXXX,n,DIAL(SIP/1111) works alone. > > > My second question. > I got two incoming trunk sip channels on my server. > > One of them is as follows. > > [46.19.209.1] > host = 46.19.209.1 > type = friend > insecure = invite > context = from-didww > canreinvite=no > > > The other is as follows: > > [62.180.237.73] > host = 62.180.237.73 > type = friend > insecure = invite > context = from-btnet2 > canreinvite = no > > > > The problem is, i get all calls coming from trunk1(didww) without a problem > but, when i receive a call from trunk2(btnet) it tries to authenticate the > sip call and denies it. It works only if i allow guest calls. > What can be the reason for that? > Thank you. > > > > > > -- > _____________________________________________________________________ > -- 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
You don't need to put quotes "" around AGI name. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Oguzhan Kayhan Sent: Tuesday, March 01, 2011 2:05 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] two questions regarding incoming call Hello, I want to make an agi script to match incoming DIDs with usernames. I tried to do such entry in incoming trunk. [DID_diddw] include = from-didww [from-didww] exten = 3130XXXXXXX,1,AGI("did.php") exten = 3130XXXXXXX,n,DIAL(SIP/${yup_no},20) but when i run the rule it says chan_sip.c:20152 handle_request_invite: Call from '81.85.224.41' to extension '31301111111' rejected because extension not found in context 'from-didww' Cant I use such agi scripts on incoming calls? PS: exten = 3130XXXXXXX,n,DIAL(SIP/1111) works alone. My second question. I got two incoming trunk sip channels on my server. One of them is as follows. [46.19.209.1] host = 46.19.209.1 type = friend insecure = invite context = from-didww canreinvite=no The other is as follows: [62.180.237.73] host = 62.180.237.73 type = friend insecure = invite context = from-btnet2 canreinvite = no The problem is, i get all calls coming from trunk1(didww) without a problem but, when i receive a call from trunk2(btnet) it tries to authenticate the sip call and denies it. It works only if i allow guest calls. What can be the reason for that? Thank you. -- _____________________________________________________________________ -- 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