[asterisk-dev] Asterisk and multiple SIP registrations to the same host
asterisk-dev at eurower.com
asterisk-dev at eurower.com
Sat Dec 5 07:35:31 CST 2009
Hi everybody,
This is my problem :
I have 3 (or more) SIP accounts defined with registers and peers. When a
call is incoming, it use the last peer section defined as channel
instead ot the correct peer.
This problem is related on different posts :
http://www.asterisk-france.net/community/showthread.php?t=7434 (french)
http://www.asterisk-france.net/community/showthread.php?t=6390 (french)
And an explanation and a patch seem to be writed by Edvina's Olle E.
Johansson (oej / edvina.net), but not found :
http://www.voip-forum.com/asterisk/2006-01/multiple-sip-registrations/
With debug this is my results :
3 samples accounts 3391234xx01, 3391234xx02 and 3391234xx03 (whith
associated usernames and passwords)
[sip-3391234xx01]
(...)
context=from-3391234xx01
[sip-3391234xx02]
(...)
context=from-3391234xx02
[sip-3391234xx03]
(...)
context=from-3391234xx03
DEBUG OF AN INCOMING CALL FROM 3391234yyzz TO 3391234xx01 :
INVITE sip:s at ip_of_my_public_asterisk SIP/2.0
(...)
From: "+3391234yyzz" <sip:3391234yyzz at 3.b2bua.sip.internal>;tag=bb515e3382
To: <sip:3391234xx01 at keyyo.net>
Contact: <sip:3391234xx01 at 192.168.21.55>
(traced with command: set ip debug peer sip-3391234xx01)
So normaly the sip channel would be sip-3391234xx01 so context
from-3391234xx01 but in fact this is what I see in the debug trace :
(...)
Found peer 'sip-3391234xx03'
(...)
So the peer found is the ... last peer defined :s
A solution consists to use a "routed" call incoming, with the same
context for all peers as explained on voip-info.org :
http://www.voip-info.org/tiki-index.php?page=Asterisk%20SIP%20Channels
(section Crossed Incoming SIP Lines)
So this is my running configuration :
-- sip.conf --
register => 3391234xx01:pass_01 at sip-3391234xx01
register => 3391234xx02:pass_02 at sip-3391234xx02
register => 3391234xx03:pass_03 at sip-3391234xx03
[sip-3391234xx01]
host=83.136.162.72 ; an IP of Keyyo.net
username=3391234xx01
secret=pass_01
type=peer
fromuser=3391234xx01
fromdomain=keyyo.net
insecure=port,invite
qualify=yes
context=in-call-router
[sip-3391234xx02]
host=83.136.162.72 ; an IP of Keyyo.net
username=3391234xx02
secret=pass_02
type=peer
fromuser=3391234xx02
fromdomain=keyyo.net
insecure=port,invite
qualify=yes
context=in-call-router
[sip-3391234xx03]
host=83.136.162.72 ; an IP of Keyyo.net
username=3391234xx03
secret=pass_03
type=peer
fromuser=3391234xx03
fromdomain=keyyo.net
insecure=port,invite
qualify=yes
context=in-call-router
-- extensions.conf --
[in-call-router]
exten => s,1,Set(cNum=${SIP_HEADER(TO):5:11})
exten => s,n,Set(cTxt=from-${cNum})
exten => s,n,Goto(${cTxt},s,1)
[from-3391234xx01]
exten => s,1,Ringing
(...)
[from-3391234xx02]
exten => s,1,Ringing
(...)
[from-3391234xx03]
exten => s,1,Ringing
(...)
This running configuration is running well :) but if a call is incoming
on 3391234xx01, the sip channel use 3391234xx03 that is not correct and
it's a probleme in order to follow sip communications with the correct
channels (ex FOP) and for others things ...
Do you have a solution for this ? Is a correction planified ?
Thanks very much ...
Best regards
----------
Version : asterisk-1.4.22
OS : Fedora Core 8
Yves Reveillon
asterisk-dev AT eurower DOT com
More information about the asterisk-dev
mailing list