[Home]

Summary:ASTERISK-10269: Wrong (???) user on incoming call
Reporter:dario (dario)Labels:
Date Opened:2007-09-10 07:53:47Date Closed:2011-06-07 14:08:22
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_sip/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) problem.txt
Description:I have 3 gateways, two audiocodes and one cisco with PRI interface. The first AC have number 9980, second 9981. I make a call from 9980 to 9981 but I want to make this call via cisco gateway.

I see INVITE from 9980 to SIP server, INVITE from SIP server to Cisco and INVITE from Cisco to SIP server. But when server receive last INVITE, it make wrong decision. I think that server should check context remote for this invite because it incoming from Cisco, but server check context zebra0.

My sip.conf:
[9980]                     ;ZEBRA
host=dynamic
defaultip=192.168.162.2
type=friend
context=zebra0
t38pt_udptl = yes
dtmfmode=auto
username=9980
password=xxx
canreinvite=yes
disallow=all
allow=g729,alaw

[9981]                     ;ZEBRA
host=dynamic
defaultip=192.168.161.77
type=friend
context=zebra1
t38pt_udptl = yes
dtmfmode=auto
username=9981
password=xxx
canreinvite=yes
disallow=all
allow=g729,alaw

[cisco]
host=192.168.119.225
disallow=all
insecure=port,invite
type=friend
context=remote
t38pt_udptl = yes               ; Default false
dtmf=auto
allow=g729
allow=alaw
qualify=yes


My extensions.conf

[remote]
exten => _9980,1,Set(__TRANSFER_CONTEXT=zebra0)
exten => _9980,2,Goto(zebra0,${EXTEN},1)
exten => _9981,1,Set(__TRANSFER_CONTEXT=zebra1)
exten => _9981,2,Goto(zebra2,${EXTEN},1)

[zebra0]
exten => _9980,1,Dial(SIP/${EXTEN},60,t)

[zebra1]
exten => _9981,1,Dial(SIP/${EXTEN},60,t)
Comments:By: dario (dario) 2007-09-10 07:58:10

Sorry, I made a mistake. My extensions.conf is:

[remote]
exten => _9980,1,Set(__TRANSFER_CONTEXT=zebra0)
exten => _9980,2,Goto(zebra0,${EXTEN},1)
exten => _9981,1,Set(__TRANSFER_CONTEXT=zebra1)
exten => _9981,2,Goto(zebra2,${EXTEN},1)

[zebra0]
include => mm_mn
exten => _9980,1,Dial(SIP/${EXTEN},60,t)


[zebra1]
include => mm_mn
exten => _9981,1,Dial(SIP/${EXTEN},60,t)

[mm_mn]        
exten => _0X.,1,Set(DTMFDIAL=${EXTEN})
exten => _0X.,2,Macro(clr-set,${CALLERID(num)})
exten => _0X.,3,Dial(SIP/192.168.119.225/${EXTEN},600,tT)

By: Joshua C. Colp (jcolp) 2007-09-19 10:00:33

This is a configuration issue. chan_sip is looking at the From header which is being passed along as 9980, and thus matching on the 9980 user. Please set the fromuser setting to ensure your username gets matched correctly. If you need to convey callerid as well please set trustrpid=yes in general and sendrpid=yes in your peers/friends.