How do I pass the caller's ID to an invite?

uniscanadmin

Customer
Joined
Mar 18, 2019
Messages
48
Reaction score
6
I'm trying to connect a 3cx PBX to Asterisk.

How do I pass the caller's number in the invite instead of the trunk number?
 
This guideline can give you the information required.
 
  • Like
Reactions: Evolute IT
I tried this, it stubbornly takes the trunk ID
 
It depends on what information is send from the PBX and what information is accepted from the endpoint.
 
Here is the key question: In which part of the SIP invite does the system want to find the caller's number?
 
  • Like
Reactions: Evolute IT
I don't care where exactly the caller ID is, I just want it to be there.

At the moment I can't achieve this in 3CX invite packages, just the line ID and not the calling one.

and so far it's only on the 3cx side. I'm only looking at packets on the 3cx PBX side,
 
Can anyone tell me how to configure a 3CX trunk so that it transmits the subscriber ID to Asterisk?
By the way, I'm not asking to adjust the sprocket, I have a problem with 3CX.
 
Can you describe your set up please? Did you use a trunk or a bridge? If you used a trunk, which template did you use to add the trunk in 3CX? Do all extensions have their own Outbound caller ID?
Do you have an Outbound Caller ID set up in your outbound rule?
 
  • Like
Reactions: Evolute IT
I tried both trunk and bridge connections.
Users do not have their own outgoing call ID registered in their account settings.
Currently I am using the Asterisk template (asterisk.pv.xml)
The only thing I managed to transmit to the trunk was the name of the caller (not a number)
 

Attachments

  • изображение_2026-05-18_162344864.png
    изображение_2026-05-18_162344864.png
    30.3 KB · Views: 6
  • изображение_2026-05-18_162400901.png
    изображение_2026-05-18_162400901.png
    47.9 KB · Views: 6
  • изображение_2026-05-18_162437790.png
    изображение_2026-05-18_162437790.png
    54.3 KB · Views: 6
I would suggest that you first remove any Caller ID customizations, then make a test call that exhibits the problem while making a SIP capture from the 3CX machine. That SIP capture will tell you:
  • how 3CX builds the message towards the trunk
  • how to tweak the trunk side to pull the number from the correct SIP field
 
  • Like
Reactions: Evolute IT
I would suggest that you first remove any Caller ID customizations

Here I didn't understand what needs to be done.
because the account and the trunk itself were created from scratch without any additional settings.
 
Users do not have their own outgoing call ID registered in their account settings.
So what do you expect to see? If there is no outbound caller ID configured on the users then the main trunk number will be used. Are you trying to send extension numbers?
 
  • Like
Reactions: Evolute IT
Are you trying to send extension numbers?

Yes, I want to send the number of the subscriber from whom the call is coming
I would like to pass this information (caller ID) in some header field, such as P-Asserted Identity.
but first I would just like to see this identifier in at least one of the invite header fields
 
I just entered subscriber number 144 in the Outbound Caller ID field, and it appeared in the headers, but my outbound calls are broken
 
This is not possible unless you add the extension number as the outbound caller ID on each extension but this will apply for all calls. So you will need a lot of custom configuration to make this work for all types of calls.
3CX by default does not send the internal extension number on outbound calls.
 
  • Like
Reactions: Evolute IT
How then is the transfer of such information carried out between different types of PBX and 3CX within one organization?
 
3CX is designed to work with other 3CX systems. 3CX bridges are designed to server this purpose. If you want to integrate with other systems then you need to put in the hours and do some manual configuration. It's possible but it will take some doing.
 
  • Like
Reactions: Evolute IT
I've been doing this for a few days now, so a few hours is no problem.
 

Latest Posts

Forum statistics

Threads
111,990
Messages
590,161
Members
164,926
Latest member
tohoken1