[pjsip] Caller ID?

Benny Prijono bennylp at pjsip.org
Thu Nov 1 10:53:32 EDT 2007

Hi Rajkumar,

In PJSUA-LIB (including Python), the From header is taken from the 
account ID (or AoR). So if you want to have different From header, 
you'll need to create different account. Note that at the very 
minimum, a PJSUA-LIB account just need the AoR URI; it doesn't need 
registration if it's not required by your deployment.


Rajkumar S wrote:
> Hi,
> I am using pjsua for testing asterisk. We are using an AudioCodes
> device to connect asterisk to PSTN. When a call lands in Audiocodes,
> it gets forwarded to asterisk. The call gets landed in * with
> following headers.
> INVITE sip:2753009 at;user=phone SIP/2.0
> Via: SIP/2.0/UDP;branch=z9hG4bKac1714857730
> Max-Forwards: 70
> From: <sip:1445169631 at>;tag=1c1714851315
> To: <sip:2753009 at;user=phone>
> Call-ID: 171485058731200032953 at
> CSeq: 1 INVITE
> Contact: <sip:1445169631 at>
> Supported: em,100rel,timer,replaces,path
> Remote-Party-ID: <sip:2753009 at>;party=called;npi=1;ton=2
> Remote-Party-ID: <sip:1445169631 at>;party=calling;privacy=off;screen
> =yes;screen-ind=3;npi=1;ton=0
> User-Agent: Audiocodes-Sip-Gateway-Mediant 1000/v.4.60A.016.003
> Content-Type: application/sdp
> Content-Length: 350
> Here I am registering with username 3911700, calling to 2753009, from 1445169631
> As you can see, the From: is the telephone number of the caller. When
> I normally connect with pjsua, the From: header is the login id, and
> To: is the number to call. Is there any way to change the From: so
> that I can write a script to do a regression test of asterisk
> configuration when I make changes?
> I am reasonably proficient with python, so I can use the python
> bindings and write a program if required.
> raj

More information about the pjsip mailing list