Using Asterisk 15.0.0, I’ve finally been able to switch over from SIP to PJSIP (a nightmare - for another time!)
Unfortunately I’m stuck on one final issue which I cannot figure out.
I have endpoints defined for mobile phones so that we can use sip clients to make calls through our company PBX. Rather than create outgoing trunks for every mobile (which isn’t feasible), under SIP I used callerid set to the extension name of the office VoIP phone, i.e. if the VoIP phone extension is Joe, the mobile extension is Joe-Mobile with callerid=Joe. With SIP this has worked perfectly.
With PJSIP the $CALLERID(name) function in all our outgoing dialplans return null when called by the Joe-Mobile endpoint but does show correctly if I run pjsip show endpoint Joe-Mobile in the cli.
Is this a bug or have I missed something? And is there a work-around?
I need to solve this urgently as we have people in the field relying on this facility.
Sorry for the delayed reply - I’ve been testing stuff around your suggestion.
Anyway your suggestion works! We don’t use extension numbers here so I wasn’t sure how to implement this without re-engineering the whole system. However it turns out that I can put any number inside the <> and the dialplan will correctly extract the CALLERID(name) part so I’ve got what I/we need.
Many thanks.
This solution has thrown up another issue - all calls from mobiles come up as anonymous on the receiver’s phone rather than with the trunk number - so I may need to post another question once I’ve finished pulling out what’s left of my hair!