TO field PJSIP header

Hi,

The first thing to say hello to the entire community since I am new although I have been reading the community messages for a long time, several of which have helped me.

Now I ask you about a problem I have:

My current internet operator (Spain) provides a SIP account but the caller identification is sent to us hidden (I understand that it will be a paid service).

The point is that the SIP capture comes in the following way “s”:

INVITE sip:s@X.X.X.X:5060 SIP/2.0

Instead of

INVITE sip:3491XXXXXX@X.X.X.X:5060 SIP/2.0

This in the from of the capture is observed well:

To: <sip:+3491XXXXXX@IMS.PROVIDER.ES;user=phone>

2 questions:

How can I tell asterisk in the dial plan that the real number is 3491XXXX instead of having to configure “s” to receive said calls?

; exten => 3491XXXXX,1,NoOP("<----------------------------------------------------->")
exten => s,1,NoOP("<----------------------------------------------------->")
    same => n,NoOP(           PROVIDER INBOUND: PROXY=${CONTEXT}       )
    same => n,NoOP("<----------------------------------------------------->")
    same => n,Dial(${OPS},60, tT)
    same => n,Hangup(60)

2)In the FROM field of the SIP capture I see the callerID of the caller that the provider tries to hide:

From: <sip:690XXXXXX@TSC101.IMS.PROVIDER.ES;user=phone>;tag=5300c2ab

How can you send the FROM to the extension XXXX so that instead of presenting itself with its own DDI 3491XXXX it presents itself with the FROM of the capture 690XXXX?

Thanks!
Regards,

This is how FreePBX does it for both chan_sip and chan_pjsip. All but one line is actually about deciding which of these applies:

Hello @david551,

Thank you very much for answering!!

For TO it seems to work perfectly.

Regarding point 2, how could I send the correct CallerID?

2)In the FROM field of the SIP capture I see the callerID of the caller that the provider tries to hide:

From: <sip:690XXXXXX@TSC101.IMS.PROVIDER.ES;user=phone>;tag=5300c2ab

How can you send the FROM to the extension XXXX so that instead of presenting itself with its own DDI 3491XXXX it presents itself with the FROM of the capture 690XXXX?

Sorry, I overlooked that part. I don’t understand what you man by “tries to hide”. Asterisk will treat the 690XXXXXX as the caller ID, by default, unless you override it in pjsip.conf. I can’t see any reason why you should be overriding the callerID in pjsip.conf.

My provider presents my own DID as the callerID:

3491XXXXX instead of 690XXXXX

When I receive the call on the terminal IP ext. XXX (OPS) is presented with the 3491XXXX.

Could it be because of this? P-Called-Party-ID: <tel:+3491XXXXX>

Regards,

Asterisk shouldn’t recognize that header, although it is being correctly used. The only similar headers, for caller IDs, it should recognize are P-Asserted-Identity and Remote-Party-ID, and then only when they are a enabled for the endpoint.

I still think you have erroneously enabled this option in your pjsip.conf:

@david551 you are a crack!!! very thanks!!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.