Asterisk 11 Sipml5

4.8k views Asked by At

When I try to register my extension using sipml5 I get the following in my CLI.
Please note that my asterisk and sipml5 are on the same server.

[Jan  3 16:48:43] ERROR[10158]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Name or service not known
[Jan  3 16:48:43] WARNING[10158]: chan_sip.c:15894 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'df7jal23ls0d.invalid'
[Jan  3 16:48:43] ERROR[10158]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Name or service not known
[Jan  3 16:48:43] WARNING[10158]: chan_sip.c:15894 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'df7jal23ls0d.invalid'
[Jan  3 16:48:43] ERROR[10158]: netsock2.c:269 ast_sockaddr_resolve: getaddrinfo("df7jal23ls0d.invalid", "(null)", ...): Name or service not known
[Jan  3 16:48:43] WARNING[10158]: chan_sip.c:15894 __set_address_from_contact: Invalid host name in Contact: (can't resolve in DNS) : 'df7jal23ls0d.invalid'
    -- Registered SIP '1500' at 37.76.211.51:55603
       > Saved useragent "IM-client/OMA1.0 sipML5-v1.2013.08.10B" for peer 1500
2

There are 2 answers

0
rahuL On

I'd encountered the same error while I tried using SipML5. As @mirkobrankovic said, but call flow is not affected by that DNS resolving, in Asterisk 11.7/Asterisk 11.6. However, to get rid of the error, all you have to do is to add the correct hostname of the asterisk server in the /etc/hosts file and while logging in, in the SipML5 interface, make sure you enter the Display Name and the Private Identity as the same values - the name of the account that you declared in sip.conf. This will get rid of the error. For example, if you have the following entry for a sip user in sip.conf:

[one_siptest2.com]
secret=1234
context=siptest2.com
host=dynamic

Add "one_siptest2.com" to the Display name and the Private Identity in the SipML5 interface.

If you are using Realtime database, you can get the name to be entered from the following simple query:

select name from sipusers where context = 'whatever_context_name';

and enter the name you want in the 2 fields mentioned above.

An image example:

sipml5

0
mohit mohan On

Try using DTLS certificate. To do that

mkdir /etc/asterisk/keys
cd /usr/src/asterisk-version/contrib/scripts
./ast_tls_cert -C hostname -O "Some name" -d /etc/asterisk/keys