Ok thanks i test. I put "match_auth_username=yes" on the two server ?
And for insecure, into the realtime database ? or into sip.conf of the second server ? best regards olivier Le 25 avril 2012 09:34, Leandro Dardini <[email protected]> a écrit : > > > 2012/4/25 Olivier CALVANO <[email protected]> >> >> Sure, sorry for the Confusion ;=) >> >> >> >> >> Server A "Trader": >> Asterisk Server 1.6.x for call routing only. >> IP Adress: 172.16.0.11 >> Use Realtim on MySQL Database >> This server route all call to a lot of VoIP Carrier. >> >> >> Server B "Ipbx" >> Asterisk Server 1.6.x for connect a lot of Linksys SPA942 phone. >> IP Adress: 172.16.0.70 >> Second IP: 172.16.1.70 (used for phone lan) >> Use Realtim on MySQL Database >> This server route all call to a lot of VoIP Carrier. >> >> >> Linksys SPA942 A: >> IP Adress: 172.16.1.200 >> Connected in SIP at Server B IPBX >> use sip.conf (no realtime) >> context: I-User01 >> >> >> Linksys SPA942 B: >> IP Adress: 172.16.1.220 >> Connected in SIP at Server B IPBX >> use sip.conf (no realtime) >> context: I-User02 >> >> >> >> On Server A "Trader", we have two sip account: >> accountname: "USER01" for user in group 1 >> accountname: "USER02" for user in group 2 >> >> On Server B "Ipbx", i use registry: >> register => USER01:[email protected]/USER01 >> register => USER02:[email protected]/USER02 >> for two connection to the Trader Server. Registry is good: >> on server A "Trader": >> >> trader*CLI> sip show registry >> Host dnsmgr Username Refresh State >> Reg.Time >> 172.16.0.11:5060 N USER01 105 Registered >> Tue, 24 Apr 2012 15:58:58 >> 172.16.0.11:5060 N USER02 105 Registered >> Tue, 24 Apr 2012 15:58:59 >> >> >> On server B "Ipbx", i have into my sip.conf after the registry: >> >> [USER01] >> type=friend >> username=USER01 >> secret=1234 >> host=172.16.0.11 >> qualify=yes >> dtmf=rfc2833 >> nat=no >> canreinvite=no >> canredirect=no >> dtmfmode=rfc2833 >> disallow=all >> allow=alaw >> context=I-User01 >> musiconhold=default >> insecure=port,invite >> >> [USER02] >> type=friend >> username=USER02 >> secret=5678 >> host=172.16.0.11 >> qualify=yes >> dtmf=rfc2833 >> nat=no >> canreinvite=no >> canredirect=no >> dtmfmode=rfc2833 >> disallow=all >> allow=alaw >> context=I-User01 >> musiconhold=default >> insecure=port,invite >> >> and in extensions.conf: >> >> [I-User01] >> exten => _0XX.,1,Dial(SIP/USER01/${EXTEN:1},90,r) >> >> [I-User02] >> exten => _0XX.,1,Dial(SIP/USER02/${EXTEN:1},90,r) >> >> >> >> >> >> >> >> When i call with Linksys SPA942 A, i use the context "I-User01" and >> the call are sent >> to SIP account "USER01" and No problems. >> >> When i call with Linksys SPA942 B, i use the context "I-User02" and >> the call are sent >> to SIP account "USER02" but Server A "Trader" reject the call >> immediatly with this error: >> >> [Apr 24 16:02:12] WARNING[1456]: chan_sip.c:10992 check_auth: username >> mismatch, have <USER01>, digest has <USER02> >> [Apr 24 16:02:12] NOTICE[1456]: chan_sip.c:18096 >> handle_request_invite: Failed to authenticate device "Olivier" >> <sip:[email protected]>;tag=as0cd775ab >> >> "Olivier" and "906280" is the information that i have on the Linksys >> SPA942 B, 906280 is the username used between >> >> >> >> >> best ? hihi >> Olivier >> >> >> >> >> >> Le 25 avril 2012 06:38, SamyGo <[email protected]> a écrit : >> > Hi, >> > Lots of mixing and confusing stuff - Can you re-explain the topology you >> > are >> > trying to achieve with proper IP addresses and declared sip ext. names. >> > >> >> When i call with the phone connected to I-User01, no problems, that's >> >> work but when i call >> >> with the second phone (use I-User02) i have a error: >> > >> > >> > Somehow it reminds of the same situation I always face when a peer is >> > declared with the same name as of the dialing one on second server - >> > only >> > Its just not registered there instead registered on server-1. >> > So when the call comes in from server-1 to server-2 fromuser=olivier >> > which >> > is not registered on server-2 but is declared. Server-2 thinks that this >> > is >> > my valid extension but it is not registered with me and so lets >> > authenticate >> > this one and here it fails and rejects the call. >> > >> > BR, >> > Sammy. >> > >> > On Tue, Apr 24, 2012 at 7:06 PM, Olivier CALVANO <[email protected]> >> > wrote: >> >> >> >> Hi >> >> >> >> i have a strange problems on my asterisk server: >> >> >> >> I have two asterisk server. >> >> >> >> On the first, i use realtime with a MySQL Database, >> >> i have two user: >> >> USER01 >> >> USER02 >> >> exactly the same configuration only username and password has >> >> different. >> >> >> >> >> >> On my second server (phone is connected on this server): >> >> >> >> I have in sip.conf: >> >> >> >> register => USER01:[email protected]/USER01 >> >> register => USER02:[email protected]/USER02 >> >> >> >> [USER01] >> >> type=friend >> >> username=USER01 >> >> secret=1234 >> >> host=172.16.0.11 >> >> qualify=yes >> >> dtmf=rfc2833 >> >> nat=no >> >> canreinvite=no >> >> canredirect=no >> >> dtmfmode=rfc2833 >> >> disallow=all >> >> allow=alaw >> >> context=I-User01 >> >> musiconhold=default >> >> insecure=port,invite >> >> >> >> [USER02] >> >> type=friend >> >> username=USER02 >> >> secret=5678 >> >> host=172.16.0.11 >> >> qualify=yes >> >> dtmf=rfc2833 >> >> nat=no >> >> canreinvite=no >> >> canredirect=no >> >> dtmfmode=rfc2833 >> >> disallow=all >> >> allow=alaw >> >> context=I-User01 >> >> musiconhold=default >> >> insecure=port,invite >> >> >> >> >> >> i see the registration: >> >> >> >> ipbx*CLI> sip show registry >> >> Host dnsmgr Username Refresh State >> >> Reg.Time >> >> 172.16.0.11:5060 N USER01 105 Registered >> >> Tue, 24 Apr 2012 15:58:58 >> >> 172.16.0.11:5060 N USER02 105 Registered >> >> Tue, 24 Apr 2012 15:58:59 >> >> >> >> >> >> >> >> >> >> i have one phone connected to the context "I-User01" and another >> >> connected to "I-User02" >> >> >> >> When i call with the phone connected to I-User01, no problems, that's >> >> work but when i call >> >> with the second phone (use I-User02) i have a error: >> >> >> >> >> >> On the first server: >> >> [Apr 24 16:02:12] WARNING[1456]: chan_sip.c:10992 check_auth: username >> >> mismatch, have <USER01>, digest has <USER02> >> >> [Apr 24 16:02:12] NOTICE[1456]: chan_sip.c:18096 >> >> handle_request_invite: Failed to authenticate device "Olivier" >> >> <sip:[email protected]>;tag=as0cd775ab >> >> >> >> >> >> The exten: >> >> >> >> On I-User01: exten => _0XX.,1,Dial(SIP/USER01/${EXTEN:1},90,r) >> >> On I-User02: exten => _0XX.,1,Dial(SIP/USER02/${EXTEN:1},90,r) >> >> >> >> >> >> >> >> i i change on the I-User02: >> >> Dial(SIP/USER02/${EXTEN:1},90,r) >> >> in >> >> Dial(SIP/USER01/${EXTEN:1},90,r) >> >> all call work's. >> >> >> >> >> >> anyone have a idea ? i think's that i have a error but don't see where >> >> >> >> best regards >> >> Olivier >> >> >> >> -- >> >> __ > > > Remove the "insecure=invite,port" and maybe add the match_auth_username=yes > in the sip.conf general section > > Leandro > > -- > _____________________________________________________________________ > -- 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 -- _____________________________________________________________________ -- 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
