[asterisk-users] incoming call label

thelma at sys-concept.com thelma at sys-concept.com
Thu Feb 15 17:46:17 CST 2018


On 02/15/2018 04:08 PM, Joshua Colp wrote:
> On Thu, Feb 15, 2018, at 7:03 PM, thelma at sys-concept.com wrote:
>> On 02/15/2018 03:44 PM, Joshua Colp wrote:
>>> On Thu, Feb 15, 2018, at 6:43 PM, thelma at sys-concept.com wrote:
>>>> I'm using Audio-codes MP-114 unit and it has two public lines PSTN ports
>>>>
>>>> IN audocodes setting I have:
>>>> "EndPoint Phone Number"
>>>>
>>>> Channel: 3    phone number: pstn-4444
>>>> Channel: 4    phone number: pstn-9998
>>>>
>>>> When I am calling " pstn-4444" the port number "Channel:3" lights up but
>>>> asterisk is showing that the call is coming on "pstn-9998"
>>>>
>>>> -- Executing ..... Answer("SIP/pstn-9998....
>>>>
>>>> Asterisk should be showing "pstn-4444" (not pstn-9998)
>>>> Where is this label coming from?
>>>
>>> It is from the SIP entry in sip.conf that it was matched against.
>>>
>>
>> Thanks for the input.
>>
>> In sip.conf I have relevant entries.
>>
>> [pstn-4444] ; incoming/outgoing calls on FXO port
>> type=friend
>> secret=spa354
>> username=voice-4444
>> mailbox=622 ; just for audiocodes error complain
>> host=dynamic
>> canreinvite=no ; (dtmf not wroking correctly without this one)
>> disallow=all
>> allow=ulaw
>> allow=alaw
>> nat=no
>> context=incoming
>> callgroup=1
>> pickupgroup=1
>> insecure=invite
>>
>> [pstn-9998]
>> type=friend
>> secret=158567
>> username=fax-9998
>> insecure=invite
>> mailbox=622  ; just for audiocodes error complain
>> host=dynamic
>> canreinvite=no  ; (dtmf not wroking correctly without this one)
>> disallow=all
>> allow=ulaw
>> allow=alaw
>> nat=no
>> context=incoming
>> callgroup=1
>> pickupgroup=
>>
>> My asterisk registration is correct as well:
>> sip show users
>> Username                   Secret           Accountcode      Def.Context
>>      ACL  Forcerport
>> pstn-9998                  158567                               incoming
>>         No   No
>> pstn-4444                  spa354                             incoming
>>       No   No
>>
>> Caller display ID from PSTN on FXO ports are working OK.
>> The [pstn-4444]  is channel: 4
>> The [pstn-9998] is channel: 3
>>
>> If the call on Audocode is lighting UP "channel:3" the sip.conf should
>> associate that call with  [pstn-4444] (and not [pstn-9998])
> 
> Not necessarily. You appear to be doing IP+port based matching. If requests always come from the same source IP address and port, then it would match only one. Turning on sip debug using "sip set debug on" and verbosity using "core set debug 9" would give you more information about each packet (including where it is from) and what was actually matched based on it.

Thanks again for the hint.
Here is the output from asterisk.

The call is coming on Audocodes gateway from: pstn-4444

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

Why not loolking up "pstn-4444" in sip.conf?

<--- SIP read from UDP:10.10.0.8:5060 --->
INVITE sip:4 at 10.10.0.4 SIP/2.0
Via: SIP/2.0/UDP 10.10.0.8;branch=z9hG4bKac766808844
Max-Forwards: 70
From: "Z" <sip:7804715665 at 10.10.0.8>;tag=1c766802762
To: <sip:4 at 10.10.0.4>
Call-ID: 7668022781522018162620 at 10.10.0.8
CSeq: 1 INVITE
Contact: <sip:pstn-4444 at 10.10.0.8:5060>
Supported:
em,100rel,timer,replaces,path,early-session,resource-priority,sdp-anat
Allow:
REGISTER,OPTIONS,INVITE,ACK,CANCEL,BYE,NOTIFY,PRACK,REFER,INFO,SUBSCRIBE,UPDATE
User-Agent: Audiocodes-Sip-Gateway-/v.5.80A.032.003
Content-Type: application/sdp
Content-Disposition: session
Content-Length: 249

v=0
o=AudiocodesGW 766797875 766797759 IN IP4 10.10.0.8
s=Phone-Call
c=IN IP4 10.10.0.8
t=0 0
m=audio 6000 RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20
a=sendrecv
<------------->
--- (14 headers 12 lines) ---
Sending to 10.10.0.8:5060 (no NAT)
Sending to 10.10.0.8:5060 (no NAT)
Using INVITE request as basis request - 7668022781522018162620 at 10.10.0.8
Found peer 'pstn-9998' for '7804715665' from 10.10.0.8:5060
  == Using SIP RTP CoS mark 5
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw), peer -
audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1
(telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 10.10.0.8:6000
Looking for 4 in incoming (domain 10.10.0.4)
list_route: hop: <sip:pstn-4444 at 10.10.0.8:5060>

--
Thelma



More information about the asterisk-users mailing list