How to show the DID to called party?

Hello all !

I would like to know how to send the calling DID to the called Party.
Do I have to set this in the Dial() function or before?

Also I would like to know if there is any proper way to set the DID to show up to the called party in a sip account.

Thanks a lot for any answer of these beginner question.

Regards,
Fabianus

I dont understand what you are asking. Perhaps someone else will, or you can try rephrasing. :smile:

Hello iceburn2003 :smile:

yes, it’s not very clear, let me try again :

When party1 calls party2 it is possible that party2 knows the DID of party1 (printed on the phone’s screen for example). I would like to know how I might set this DID when party1 (calling from my asterisk box) calls party2 (outside or inside of my asterisk system).

Hope this is clearer :smile:

Regards,
Fabianus

DID means direct in dialling. In Asterisk communities, it is often mis-used to mean a SIP trunk, incoming from a service provider. Neither definition makes sense in this context. The closest interpretation would be that you want to report the called number, incoming to Asterisk, but a more normal requirement would be to report the calling number.

Called number shouldn’t be too much trouble; you just need to set the CLI. Calling number would be even less trouble, except that, if you are calling out on a trunk, it is very likely that your service provider will only allow you to use numbers that they provide to you.

Hello david,

excuse-me for the miss-use of DID.

So, what I want to do is to report the calling number. Meaning that Party1 calling from a sip-extension in my asterisk box reports its number to Party2 that is somewhere outside of my asterisk box.

You say that this is little trouble :smile:

Thanks for giving me a littel advice on how to get this done !

Regards,
Fabianus

You don’t need to do anything to have incoming caller ID forwarded. If it is not happening, either you have configured something to override the incoming CLI, or you are using an outgoing service provider that doesn’t allow you to use CLI that you don’t own.

In particular, most, if not all, outgoing PSTN service providers will not allow you to provide CLI that you don’t own, as PSTN users expect to have trustworthy CLI and and generally only other service providers are trusted.

Dear David,

thanks for your additional infos.
Let’s suppose that I am a total beginner … (which actually is the case :smile:)

  1. incoming CLI is working fine, meaning that on x-lite, connected to a sip-extension of my asterisk box I can see the phonenumber of the calling party.

  2. but for outgoing calls : how to I set the CLI ? I mean, when I do a call with my sip-extension (ex. 1001), I want the called party to see the following CLI : 0160401001. But if another sip-extension (ex. 1002) calls someone I want the following CLI to show up : 0160401002

Thanks a lot for any additional help in order to set the CLI (like explained in 2)

Regards,
Fabianus

Configure the full caller-ID in the phone, or

Configure the full caller-ID with callerid= in sip.conf, or

Use the CALLERID dialplan function to obtain the short CLI from the phone and set a long caller ID.

All of these assume that your service provider doesn’t simply overwrite the caller ID with your pilot number.

Hello david,

I set the following in my sip.conf :

[1001]
callerid=FirstName LastName <0164601001>

But when I call somewhere (for example another sip-extension of the asterisk box, connecte to with x-lite), this caller id does not show up. Do I have to setup soemthing else ?

Thanks for any additional help :smile:

Regards,
Fabianus

Works for me, using 1.6.1.0. Note, for version 1.4, you may need quotation marks. Version 1.2 is unsupported.

As explained here :
voip-info.org/wiki/view/Aste … g+sip.conf

I set it like this :
callerid=“FirstName LastName” <0164601001>

But still it doesn’t work. Are you sure that I do not have to set anything in my dialplan ?

Regards,
Fabianus

david, :blush:

I had two callerid definitions in the relevant extension configuration …

Now it works just fine :smile:

Thanks again for your kind support.

Yours,
Fabian