I just bought a SIP phone number via OVH with the following informations:
LOGIN USERNAME: 0033123456789
AUTH USERNAME: 0033123456789
When I update sip.conf with
port = 9099
qualiffier = non
disallow = all
allow = ulaw
allow = g729
srvlookup = yes
register => 0033123456789:cOuCou1234?*@XXX.fr.sip.ovh
when I reload I have:
WARNING: chan_sip.c:24891 handle_response_register: Got error 400 on register to @XXX.fr.sip.ovh, giving up (check config)
like if the ? is a problem in the password.
Why does it not work?
Every command on ASTERISK CLI appears 2 times…what to do?
You should upgrade to chan_pjsip, as chan_sip is not longer supported, and not included in the latest version of Asterisk.
You have’t made use of the auth username information and username does nothing for where you use it. It is not clear why they have given both LINE and NUMBER. Where did they tell you so use 9099?
type=friend with insecure=invite is a security vulnerability. insecure=port should only be used if you are sure you need it. Provides should normally be peers.
400 says that the request is malformed, which should not be possible. It also says you should look for a Reason header, in the response, for further information. However, in the end, you may have to ask the provider why they gave this, somewhat unusual, response.
I hope that isn’t your real password. I don’t see any real point in redacting the provider’s domain name.
I’ve no idea about the double commands.
Thanks for your answer!
I am using ASTERISK 20. I just have to copy past what I have in sip.conf to pjsip.conf?
From LINE to PASSWORD, that are the informations gave by OVH and they provide the PHONE NUMBER and the LINE…
For my project, I developed a nodejs code using ari-client to originate a call and play sound files according to what the calle says.
And in this configuration I added the port 9099 to communicate with a websocket.
Thanks for the tip I will use peers.
This not my real phone number or password, but the real password ended with ?* and maybe that is reason that it is not possible to register on asterisk because when I use a false password I have
Host dnsmgr Username Refresh State Reg.Time
XXX.fr.sip.ovh:5060 N 0033123456789 120 No Authentication
that is normal because of the bad password
but if I use the real password I have
ip55*CLI> sip show registry Host dnsmgr Username Refresh State Reg.Time
XXX.fr.sip.ovh:5060 N * 120 Rejected
where you can see that the command register recognize only starting to * from 0033123456789:cOuCou1234?*@XXX.fr.sip.ovh which is the provided command on the OVH wesite.
I found the solution. The problem was the default password given by OVH.
On the french website they ask to use special characters but in the english website they limit the special characters to (e.g. %, #, :, $, *).
If anybody has good practices for ARI originate using SIP phone number please don’t hesitate
with in sip.conf:
qualiffier = no
disallow = all
srvlookup = yes