Re: [asterisk-users] [SOLVED] incoming call label

2018-02-16 Thread thelma
On 02/16/2018 12:27 AM, Jean Aunis wrote:
> Le 16/02/2018 à 05:30, the...@sys-concept.com a écrit :
>> On 02/15/2018 04:49 PM, Joshua Colp wrote:
>>> On Thu, Feb 15, 2018, at 7:46 PM, the...@sys-concept.com wrote:
>>>
>>> 
>>>
 Thanks again for the hint.
 Here is the output from asterisk.

 The call is coming on Audocodes gateway from: pstn-

 But asterisk display:
 Found peer 'pstn-9998' for '7804715665' from 10.10.0.8:5060

 Why not loolking up "pstn-" in sip.conf?
>>> It found pstn- using 10.10.0.8:5060 - if the request always comes
>>> from the same IP address and port it has no other way built in to
>>> differentiate between the two except by matching based on username in
>>> the 'From' header.
>> It didn't find "pstn- using 10.10.0.8:5060"
>> The call came IN from PSTN line on audiocodes equipment to FXO port that
>> is labelled "pstn-"  so asterisk reported as such.
>> And I think asterisk suppose to lookup this label in sip.conf to the
>> registered entry but instead selected pstn-9998 entry; I don't know why.
>>
>> If the call came IN on pstn-
>> and sip.conf has two entries:
>> [pstn-]
>> [pstn-9998]
>>
>> Why it can not distinguish between the two of them correctly?
>>
>> -- 
>> Thelma
>>
>>
> If your device supports SIP authentication, you can try to turn on the
> "match_auth_username" parameter in sip.conf. It is said to be
> experimental but has always worked well for me.

Thanks for the input.
I've tried "match_auth_username" parameter in sip.conf it didn't work.
but the above entry needs to be enable in sip.conf to avoid "user
mismatch" error

Calls are coming on "pstn-" from Audiocodes FXO but sip.conf
recognizes it as "pstn-9998"

But adding to sip.conf relevant entry in my case [pstn-] and [pstn-9998]
"user=peer"

SOLVED the problem.
Now command line is showing correctly:
calls coming from pstn- are showing on command line as "pstn-"

Thanks to Julian Beach for the hint!

--
Thelma.






-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] username mismatch

2018-02-16 Thread Khalil Khamlichi
try with

username=pstn-1270

On Fri, Feb 16, 2018 at 5:50 PM,   wrote:
> When I have an incoming call I get a "username mismatch":
>
> WARNING[7459][C-0007]: chan_sip.c:16587 check_auth: username mismatch, 
> have <55>, digest has 
> NOTICE[7459][C-0007]: chan_sip.c:25809 handle_request_invite: Failed to 
> authenticate device "KZ" ;tag=1c117168544
>
> my sip.conf entry:
>
> [pstn-1270] ; incoming/outoging calls on FXO
> type=friend
> secret=x
> username=voice-1270
> user=peer
> mailbox=369 ; just for audiocodes error complain
> host=dynamic
> insecure=port,invite
> canreinvite=no ; (dtmf not working correctly without this one)
> disallow=all
> allow=gsm
> allow=ulaw
> allow=alaw
> nat=no
> context=incoming
> callgroup=1
> pickupgroup=1
> qualify=yes
>
> --
> Thelma
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] [SOLVED] username mismatch

2018-02-16 Thread thelma
On 02/16/2018 10:50 AM, the...@sys-concept.com wrote:
> When I have an incoming call I get a "username mismatch":
> 
> WARNING[7459][C-0007]: chan_sip.c:16587 check_auth: username mismatch, 
> have <55>, digest has 
> NOTICE[7459][C-0007]: chan_sip.c:25809 handle_request_invite: Failed to 
> authenticate device "KZ" ;tag=1c117168544
> 
> my sip.conf entry:
> 
> [pstn-1270] ; incoming/outoging calls on FXO 
> type=friend
> secret=x
> username=voice-1270
> user=peer
> mailbox=369 ; just for audiocodes error complain
> host=dynamic
> insecure=port,invite
> canreinvite=no ; (dtmf not working correctly without this one)
> disallow=all
> allow=gsm 
> allow=ulaw
> allow=alaw
> nat=no
> context=incoming
> callgroup=1
> pickupgroup=1
> qualify=yes
> 

sip.conf needs to have enabled:
match_auth_username=yes

--
Thelma

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] username mismatch

2018-02-16 Thread thelma
When I have an incoming call I get a "username mismatch":

WARNING[7459][C-0007]: chan_sip.c:16587 check_auth: username mismatch, have 
<55>, digest has 
NOTICE[7459][C-0007]: chan_sip.c:25809 handle_request_invite: Failed to 
authenticate device "KZ" ;tag=1c117168544

my sip.conf entry:

[pstn-1270] ; incoming/outoging calls on FXO 
type=friend
secret=x
username=voice-1270
user=peer
mailbox=369 ; just for audiocodes error complain
host=dynamic
insecure=port,invite
canreinvite=no ; (dtmf not working correctly without this one)
disallow=all
allow=gsm 
allow=ulaw
allow=alaw
nat=no
context=incoming
callgroup=1
pickupgroup=1
qualify=yes

-- 
Thelma

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] incoming call label

2018-02-16 Thread Julian Beach
Hello Thelma,

Friday, February 16, 2018, 2:16:02 AM, you wrote:

> Contact: "sip:pstn-"

> And it found in sip.conf only:
> Found peer 'pstn-9998' for '7804715665' from 10.10.0.8:5060

> Is perhaps the name effected by the special character "-" (dash) that is
> why it only matches "pstn" and take the first one it found.  Will it
> make a difference if I rename the port to pstn_ in configuration files.

If the type=friend then it matches on IP Address and Port Number, not
the user name. It will then use the first entry in the sip.conf - it
does not take any notice of the name. If you change the order that the
two entries appear, all the calls will appear to come from [pstn-9998]
even if they come from [pstn-].

I  used  to  set user=peer, which solved the problem for me, but I now
direct  all  the calls to a single context in extensions.conf and then
send them to their own contexts based on the DNID.


-- 
Best regards,
 Julianmailto:jb_s...@trink.co.uk


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users