Siptrunk registration fails when call-id set to xxx@[::0] as provider returns call-id set to xxx@@[0:0:0:0:0:0:0:1]

This is a call for help, is it possible to control how the sip Call-ID is generated. The PBX is configured to use chan_sip.

Running FreePBX 14, Asterisk 13

The pbx has multiple NIC’s. Hence no bind address for chan_sip is specified. This results in the registration failing when connecting to the siptrunk provider.

In short the registration used a call-id which contains @[::0]
[2019-01-22 03:09:17] DEBUG[2838] chan_sip.c: Initializing initreq for method REGISTER - callid 25b152673ff227a37f70509a3c3ae0b0@[::1]

The response from the provider rewrite the [::0] and are then ignored as unknown when received by the pbx:
<— SIP read from UDP:91.121.129.23:5060 —>
SIP/2.0 100 Trying
Call-ID: 25b152673ff227a37f70509a3c3ae0b0@[0:0:0:0:0:0:0:1]
CSeq: 102 REGISTER
From: sip:[email protected];tag=as63cbdc9f
To: sip:[email protected]
Via: SIP/2.0/UDP 10.10.1.218:5060;received=217.109.91.202;rport=54893;branch=z9hG4bK62a0aa52
Content-Length: 0

So far the only way the call-id has been affected is by setting the sip “Bind Address” to the ip of one of the NIC’s. The registration then works ok as the [::0] is replaced by the bind ip addr and this is not munged by the provider.

However this is not ideal as there are phones on multiple NICs and using 0.0.0.0 as the bind ip makes sense.

Any help would be appreciated. Can the value of the Call-ID be influenced? Is there a way for the variable ${SIPCALLID} to be set for the registration through some registration hook that allows this to be altered. or for it to use the [0:0:0:0:0:0:0:1]

Regards Allan

Solved it.

Editting the host file to move the hostname to the servers IP instead of the ipv4 and ipv6 localhost did it.

The FreePBX 13 I’m migrating from had a hand edited hosts file and was hoping not to do that in freepbx 14. This explains the different behaviour and nothing to do with the asterisk version…

FreePBX creates /etc/hosts file like this when setting the hostname :

 127.0.0.1 freepbx1.mydomain.org localhost localhost.localdomain localhost4
 ::1 freepbx1.mydomain.org localhost localhost6

The hand edited version which fixes the problem

127.0.0.1 localhost localhost.localdomain localhost4
::1 localhost localhost6

10.0.0.101 freepbx1.mydomain.org freepbx1

Kinda of obvious, but was trying to stick with using the GUI only so only tried this at the last minute.

Thanks
A

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.