[asterisk-bugs] [Asterisk-GUI 0010151]: AsteriskNOW DID into wrong context

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Sep 13 12:22:36 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10151 
====================================================================== 
Reported By:                dmgeurts
Assigned To:                pari
====================================================================== 
Project:                    Asterisk-GUI
Issue ID:                   10151
Category:                   General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.4.5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!): 1127 
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             07-07-2007 10:16 CDT
Last Modified:              09-13-2007 12:22 CDT
====================================================================== 
Summary:                    AsteriskNOW DID into wrong context
Description: 
Two accounts from same ITSP, each with a different DID number. When both
accounts are active and registered, only one picks up the call. This
reproducible and consisted. It is always the same trunk/context that the
incoming call is put into.

Disabling either account will result in correct operation, only reachable
on the DID which is registered not the other.

I have no workaround as I can't manage to catch the call using the called
number. Debugging shows 's' and in the wrong context.
====================================================================== 

---------------------------------------------------------------------- 
 mariusmuja2 - 09-13-07 12:22  
---------------------------------------------------------------------- 
Hi,

I'm having the same problem and it's always reproductible. When I have two
account with the same domain registered, the incoming calls to both
accounts arrive in the same context (seems the context from the account
that appears last in users.conf). It appears that the problem is that
asterisk picks the context of the incoming call using the IPs of the
registered accounts.

For example I have the following two account configured in sip.conf:


[trunk_4]
context = DID_trunk_4
dialformat = ${EXTEN:1}
hasexten = no
hasiax = no
hassip = yes
host = sip.netmaster.ro
fromdomain = netmaster.ro
registeriax = no
registersip = yes
secret = *************
trunkname = Custom - Smartcall2
trunkstyle = customvoip
username = 40356567370
fromuser = 40356567370
insecure = very
canreinvite = no
allow = all
allow = ulaw



[trunk_2]
context = DID_trunk_2
dialformat = ${EXTEN:1}
hasexten = no
hasiax = no
hassip = yes
host = sip.netmaster.ro
fromdomain = netmaster.ro
registeriax = no
registersip = yes
secret = *************
trunkname = Custom - smartcall
trunkstyle = customvoip
username = 40354567322
fromuser = 40354567322
insecure = very
canreinvite = no
disallow = all
allow = ulaw


When a call for number 40356567370 arrives it is put in DID_trunk_2
instread of DID_trunk_4. Here is the sip debug:

<--- SIP read from 193.16.148.244:5060 --->
INVITE sip:s at 70.79.11.164 SIP/2.0
Record-Route:
<sip:193.16.148.244;ftag=8e3a01460a34014bfcecb860579c233c;lr>
Via: SIP/2.0/UDP
193.16.148.244;branch=z9hG4bK72d.2ed1a4d63acf79709e21fd7652b987ec.0
Via: SIP/2.0/UDP
193.16.148.244:5061;branch=z9hG4bKcf00610eb9e4d75f3e645514581f8a26;rport=5061
Max-Forwards: 16
From: <sip:None at 193.16.148.244>;tag=8e3a01460a34014bfcecb860579c233c
To: <sip:40356567370 at 193.16.148.244>
Call-ID: 7B72AC79-610711DC-A9A5D13F-AFD94EAC at 193.16.148.226
CSeq: 200 INVITE
Contact: Anonymous <sip:193.16.148.244:5061>
Expires: 300
User-Agent: Sippy
cisco-GUID: 2070152945-1627853276-2235564033-1119049838
h323-conf-id: 2070152945-1627853276-2235564033-1119049838
Content-Length: 356
Content-Type: application/sdp

v=0
o=Sippy 150800268 0 IN IP4 193.16.148.244
s=SIP Call
t=0 0
m=audio 18530 RTP/AVP 3 18 8 0 4 101
c=IN IP4 193.16.148.226
a=rtpmap:3 GSM/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:4 G723/8000
a=fmtp:4 annexa=yes
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=direction:passive

<------------->
--- (16 headers 16 lines) ---
Sending to 193.16.148.244 : 5060 (no NAT)
Using INVITE request as basis request -
7B72AC79-610711DC-A9A5D13F-AFD94EAC at 193.16.148.226
Found peer 'trunk_2'
Found RTP audio format 3
Found RTP audio format 18
Found RTP audio format 8
Found RTP audio format 0
Found RTP audio format 4
Found RTP audio format 101
Peer audio RTP is at port 193.16.148.226:18530
Found description format GSM for ID 3
Found description format G729 for ID 18
Found description format PCMA for ID 8
Found description format PCMU for ID 0
Found description format G723 for ID 4
Found description format telephone-event for ID 101
Capabilities: us - 0x4 (ulaw), peer - audio=0x10f
(g723|gsm|ulaw|alaw|g729)/video=0x0 (nothing), combined - 0x4 (ulaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event), peer - 0x1
(telephone-event), combined - 0x1 (telephone-event)
Peer audio RTP is at port 193.16.148.226:18530
Looking for s in DID_trunk_2 (domain 70.79.11.164)     
<<<<<<<<<<<<<----------- Here!
list_route: hop:
<sip:193.16.148.244;ftag=8e3a01460a34014bfcecb860579c233c;lr>

<--- Transmitting (no NAT) to 193.16.148.244:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
193.16.148.244;branch=z9hG4bK72d.2ed1a4d63acf79709e21fd7652b987ec.0;received=193.16.148.244
Via: SIP/2.0/UDP
193.16.148.244:5061;branch=z9hG4bKcf00610eb9e4d75f3e645514581f8a26;rport=5061
From: <sip:None at 193.16.148.244>;tag=8e3a01460a34014bfcecb860579c233c
To: <sip:40356567370 at 193.16.148.244>
Call-ID: 7B72AC79-610711DC-A9A5D13F-AFD94EAC at 193.16.148.226
CSeq: 200 INVITE
User-Agent: Twinkle/2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: <sip:s at 70.79.11.164>
Content-Length: 0


<------------>
    -- Executing [s at DID_trunk_2:1] Goto("SIP/40354567322-0820ae50",
"default|200|1") in new stack
..... 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
09-13-07 12:22  mariusmuja2    Note Added: 0070492                          
======================================================================




More information about the asterisk-bugs mailing list