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