Pjsip Vs Chan_sip: Where Is Callerid(num) Taken From?

Home » Asterisk Users » Pjsip Vs Chan_sip: Where Is Callerid(num) Taken From?
Asterisk Users 1 Comment

Dear List

We are renewing our voicemail server and by this occasion I am migrating from chan_sip to pjsip.

I have come to a problem I have not experienced on other pjsip examples.

Switzerland was heavily SS7 based in the past.

So usually you have a Network provided A Number, which is mapped to the PAI Header in SIP. And there is the user provided phone number aka Generic Number, aka Display Number, which is to be displayed to the destination and which is transmitted in the From: Header.

So the From: Number is the one we want as source of the call in the voicemail:

With chan_sip:

Set(Caller=${CALLERID(number)})

${Caller} contains the number from the From: header

With pjsip:

${Caller} contains the number from the PAI header

Any clue how I can change this pjsip behavior?

Mit freundlichen Grüssen

-Benoît Panizzon-

I m p r o W a r e A G – Leiter Commerce Kunden

One thought on - Pjsip Vs Chan_sip: Where Is Callerid(num) Taken From?

  • Ok, just figured it out, looks like pjsip uses some reversed trust logic…

    PAI contains the network provided screened number, the one which can be trusted and used for billing purposes and similar.

    From contains the generic number, which should be displayed, but which is user provided and therefore not very trustworthy.

    So of course I want to trust the PAI (billing etc) and Display the From:
    header on the called phone.

    trust_id_inbound=yes

    But this causes the PAI Number to be filled in callerID(number)
    switching to ‘no’ causes the From Number, to be filled in callerID(number).

    Very odd!

    Mit freundlichen Grüssen

    -Benoît Panizzon-

    I m p r o W a r e A G – Leiter Commerce Kunden