two questions regarding incoming call

Home » Asterisk Users » two questions regarding incoming call
Asterisk Users 1 Comment

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.

One thought on - two questions regarding incoming call

  • Update,

    My first question solved already.
    There was an error on my agi script.

    But second problem still valid.