Strange problem on ougoing call

Home » Asterisk Users » Strange problem on ougoing call
Asterisk Users 3 Comments

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:1234@172.16.0.11/USER01
register => USER02:5678@172.16.0.11/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 , digest has
[Apr 24 16:02:12] NOTICE[1456]: chan_sip.c:18096
handle_request_invite: Failed to authenticate device “Olivier”
;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

3 thoughts on - Strange problem on ougoing call

  • 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:1234@172.16.0.11/USER01
    register => USER02:5678@172.16.0.11/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 , digest has
    [Apr 24 16:02:12] NOTICE[1456]: chan_sip.c:18096
    handle_request_invite: Failed to authenticate device “Olivier”
    ;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 a écrit :

  • 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 a écrit :

  • Perfect that’s work ;=)

    very thanks

    Le 25 avril 2012 10:19, Olivier CALVANO a écrit :