Asterisk incoming SIP URI domain not passed through to phone

Hi guys,

I’m trying to diagnose a caller ID issue and I’m not sure if it’s a problem with my configuration, or a limitation of Asterisk. I’m running version 11.1.0.

I have Asterisk set up to receive guest calls to sip:myaddress@mydomain.com and forward them on to a SIP phone extension. This is all working correctly, with calls correctly arriving at my extension. However, the caller ID information I’m receiving isn’t complete – the domain section is being replaced with my local domain.

As an example, if someone calls me and provides a SIP_HEADER from value of 'john@mydomain.com’ – or, if I comment out ‘fromdomain’ in sip.conf, ‘john@mypublicIP’. This means that I’m unable to return the call directly.

I have enabled SIP debug and can see that the from value in the SIP_HEADER is correct, but that it is being changed when the call is sent to my extension:

<--- SIP read from UDP:192.168.0.1:5060 --->
INVITE sip:myaddress@mydomain.com SIP/2.0
Via: SIP/2.0/UDP 192.168.0.1:5060;rport;branch=z9hG4bKPj07e4de87d1cf46aeb616a4daf0a229a9
Max-Forwards: 70
From: <sip:john@smith.com>;tag=3a7f3a2cfd904785b2f0fa3fd28740dc
To: <sip:myaddress@mydomain.com>
Contact: <sip:john@192.168.0.1:5060;ob>
Call-ID: ad8a6ccce4c14d5c96a8f5c3c9f17204
CSeq: 25967 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: MicroSIP/3.2.4
Content-Type: application/sdp
Content-Length: 640

<--- Transmitting (no NAT) to 192.168.0.1:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.1:5060;branch=z9hG4bKPj07e4de87d1cf46aeb616a4daf0a229a9;received=192.168.0.1;rport=5060
From: <sip:john@smith.com>;tag=3a7f3a2cfd904785b2f0fa3fd28740dc
To: <sip:myaddress@mydomain.com>
Call-ID: ad8a6ccce4c14d5c96a8f5c3c9f17204
CSeq: 25967 INVITE
Server: Asterisk PBX 11.1.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:myaddress@192.168.0.2:5060>
Content-Length: 0

<--- SIP read from UDP:192.168.0.1:36412 --->
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.0.2:5060;branch=z9hG4bK0ade99bc
From: <sip:john@mydomain.com>;tag=as2b86abde
To: <sip:myextension@192.168.0.1:36412;transport=udp>;tag=2096782531
Call-ID: 499bc793733cbaea3c37602028e8f664@mydomain.com
CSeq: 102 INVITE
Content-Length: 0

In my extensions.conf file I have:

[public]
exten=>myaddress,1,Dial(SIP/myextension,20)

And in sip.conf I have:

[myextension]
type=friend
host=dynamic
secret=mypassword

Any clues appreciated!

Asterisk is a back to back user agent, not a SIP proxy. Moreover, it is not limited to SIP, but actually started as a PABX for circuit switched telephony, which has no concept of a domain name. Only the user part of the the URIs is passed between the incoming and outgoing channels.