[solved]SIP outbound calls : no callerid

Hello,

Recently, I’ve discovered that Asterisk (1.4.16.2) doesn’t send my callerid anymore. My provider is voipdiscount; when I use their Windows software, my phone number is sent. As soon as I use Asterisk, my number isn’t sent (something wrong with Asterisk’s output callerid).

It’s possible that I’ve modified something in sip.conf.
Could you please help me to check what’s wrong ?

Thank you.

My sip.conf :

[code]
[general]
context=internal
language=fr
allowoverlap=no ; Disable overlap dialing support. (Default is yes)
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls
mailbox=1234

externip= xxx.dns.org ;IP publique du routeur
localnet=192.x.y.0/24 ;Adresse du réseau interne
nat=yes

register => toto:pass@sip.voipdiscount.com

[voipdiscount]
context=outgoing
type=peer
fromdomain=sip.voipdiscount.com
host=sip.voipdiscount.com
username=toto
secret=pass
fromuser=+331xxxxxxxxxx
callerid=+331xxxxxxxxxx
allow=alaw
allow=ulaw
allow=g729[/code]

Have you tried:

  1. Using the latest version of Asterisk ?
  2. Setting the CID in the dial plan ?

[quote=“Dovid”]Have you tried:

  1. Using the latest version of Asterisk ?
  2. Setting the CID in the dial plan ?[/quote]
    Hello,
    It seems that there was a mismatch in the authentification procedure of my phone number.
    It’s now correctly declared, and my provider is sending callerid. (It’s not an Asterisk issue).

Thanks for your help.

Please kindly help me to understand this fromdomain field. AFAIC and unlike what is shown below, the fromdomain field should be equated to the domain of a machine that runs the asterisk PBX system.

[quote=“kafifi”] [voipdiscount] context=outgoing type=peer fromdomain=sip.voipdiscount.com host=sip.voipdiscount.com[/quote]
Is fromdomain supposed to contain the domain of the VoSP SIP server or the domain of the device that is hosting the asterisk PBX system? According to Asterisk: The Future Of Telephony book, on p.361 and I quoted below:

[quote]fromdomain (peer)
This allows you to set the domain in the From: field of the SIP header. It may be
required by some providers for authentication:
fromdomain=my.hostname.tld[/quote]
fromdomain is supposed to contain my.hostname.tld, the domain of the device that is hosting the asterisk PBX system. If I set this my.hostname.tld variable to contain the domain of my Fonera WiFi router that runs my asterisk PBX system, the VoIP BackDoor Dialing free services provided by GizmoProject (GP) fails to authenticate; however, if I set this my.hostname.tld variable to contain the domain of GP (proxy01.sipphone.com), the authentication method works and I am able to place free calls. So, what should this my.hostname.tld variable contain? If anyone wants to argue that the my.hostname.tld variable should contain the domain of the VoSP, then why Asterisk: The Future Of Telephony book, on p.352, assigns this my.hostname.tld variable to externhost?

YES

.
can’t delete :frowning:

Hi Andrewz,

Does this mean my.hostname.tld is the VoSP domain? If so, then it is kind of misleading because externhost is supposed to contain the FQDN of the host running asterisk PBX. In this case, it is my.hostname.tld. So, does this mean the Asterisk: The Future Of Telephony book is not correct?

They are used for the different purposes.

externhost is normally set to the router’s hostname, this hostname is normally registered with DynDNS or similar service.
externhost is used by Asterisk to determine it’s public IP address which will be put into the signalling (Contact & Via fields).

fromdomain has different purpose - it is used in SIP authentication process for creating the proper From field as requested by VSP.

You should have individual fromdomain settings for your VSPs.
You should have only one externhost per server :wink:

[quote=“AndrewZ”]They are used for the different purposes.

externhost is normally set to the router’s hostname, this hostname is normally registered with DynDNS or similar service.
externhost is used by Asterisk to determine it’s public IP address which will be put into the signalling (Contact & Via fields).

fromdomain has different purpose - it is used in SIP authentication process for creating the proper From field as requested by VSP.

You should have individual fromdomain settings for your VSPs.
You should have only one externhost per server :wink:[/quote]
Hi Andrewz,

I completely agreed with you and understood the usage of both fromdomain and externhost fields. However, what I don’t understand is why the Asterisk: The Future Of Telephony book treats fromdomain to use the same variable (my.hostname.tld) as used on the externhost.

EDIT: The following is an excerpt from /etc/asterisk/sip.conf file regarding the fromdomain field:

; fromdomain=mydomain.tld ; When making outbound SIP INVITEs to ; non-peers, use your primary domain "identity" ; for From: headers instead of just your IP ; address. This is to be polite and ; it may be a mandatory requirement for some ; destinations which do not have a prior ; account relationship with your server.
Unless I misunderstood the above statement, the fromdomain field should contain the domain of the machine that runs asterisk when sending out the SIP INVITES. If you remove the fromdomain line, you will see the From: header will contain the IP Address of your asterisk machine (or the public IP Address of the private LAN where the asterisk machine resides and is configured with nat=yes).

Oh, I hope I see your point.

There are at lest two purposes of fromdomain.

The first is what you have quoted already - “use your primary domain “identity” for From: headers instead of just your IP address. This is to be polite…”. This usage is more cosmetic.

The 2nd usage I’ve mentioned earlier - it is used in SIP authentication process for creating the proper From field as requested by VSP.
Some VSPs are authenticating your using only the information presented in Authorization: string contained in REGISTER or INVITE response to 401 Authentication required (Digest username=“username”, realm=“sip.vsp.tld”, qop=auth, algorithm=MD5, uri=“sip:vsp.tld”, nonce=“xxxxxxxxx”, …)

But at the same time VSP’s proxy may need correct domain indication which may be taken from the From field and the combination of the digest username and domain (== fromdomain value) will be used to authenticate & route the call. I suppose this scenario is common for VSPs who are serving different domains on the same proxy.

I believe this option has become obsolete by default due to the 2nd option you mentioned below.

[quote]The 2nd usage I’ve mentioned earlier - it is used in SIP authentication process for creating the proper From field as requested by VSP.
Some VSPs are authenticating your using only the information presented in Authorization: string contained in REGISTER or INVITE response to 401 Authentication required (Digest username=“username”, realm=“sip.vsp.tld”, qop=auth, algorithm=MD5, uri=“sip:vsp.tld”, nonce=“xxxxxxxxx”, …)

But at the same time VSP’s proxy may need correct domain indication which may be taken from the From field and the combination of the digest username and domain (== fromdomain value) will be used to authenticate & route the call. I suppose this scenario is common for VSPs who are serving different domains on the same proxy.[/quote]
Now, this makes more sense to me. Many thanks Andrewz.