PJSUA: Set From userpart when making a call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey there,

I was wondering whether there is a way to set the userpart of
the From header when making a call with PJSUA's pjsua_call_make_call().

Looking at the code, and assuming I'm not overlooking something, it doesn't seem to be possible. From what I understand, the From header is constructed with what is configured in the account that is used for the call.

My scenario is the following:
I'm writing a gateway to translate between VoIP and a digital radio network.
The gateway is to be registered with a PBX and is to forward calls from the radio network to the registrar by translating radio calls to SIP calls (and vice versa: SIP->radio network).

Each participant of the radio network has their own ID (think: telephone number)
and VoIP users must be able to call back radio users.
For this reason I'd like to set the radio user's number in the From header header when calling the PBX, so that they see not only who is calling but also to give them the ability to call back.

My current approach is to patch PJSUA by introducing another member to pjsua_call_setting (probably not the right place, but would serve my purposes) that takes a pj_str_t which contains the userpart to be put in the From header. In the function itself, it would check whether the string is not empty and take that string instead of what's configured with the account.


Best Regards,

Andreas Wehrmann


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux