L.S,
I have PJSIP/PJSUA running on a raspberry pi. That works ok, I can use my
external sip provider to call out.
Since this will be part of a disabled person alarm system later, I want the
caller number the call recipient sees not to be the
standard number provided by the sip provider, but an arbitrary number so I
can program the receiving phone
to always ring on that number with a custom ring tone, irrespective of
general setting on that phone. These are standard
functions on iOS and Android phones.
I hope that explanation makes sense.
The question is how to set the outgoing originator number in pjsua.
All instructions I found reference Asterix, and I do not want to run that.
Advice will be highly appreciated.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
You need to set From header when you are registering an account. As far as
I know there was no other methods to set From header (I tried it 2 years
ago).
пт, 24 июл. 2020 г. в 22:07, r.b.muller@gmail.com:
L.S,
I have PJSIP/PJSUA running on a raspberry pi. That works ok, I can use my
external sip provider to call out.
Since this will be part of a disabled person alarm system later, I want
the caller number the call recipient sees not to be the
standard number provided by the sip provider, but an arbitrary number so I
can program the receiving phone
to always ring on that number with a custom ring tone, irrespective of
general setting on that phone. These are standard
functions on iOS and Android phones.
I hope that explanation makes sense.
The question is how to set the outgoing originator number in pjsua.
All instructions I found reference Asterix, and I do not want to run that.
Advice will be highly appreciated.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic should happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
I am unclear as what element of the account struct to set to the outgoing spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
From: pjsip On Behalf Of
Sent: Sunday, July 26, 2020 17:12
To: pjsip list pjsip@lists.pjsip.org
Subject: Re: [pjsip] change (spoof) originator phone number in outgoing call using pjsip/pjsua
You need to set From header when you are registering an account. As far as I know there was no other methods to set From header (I tried it 2 years ago).
пт, 24 июл. 2020 г. в 22:07, <r.b.muller@gmail.com mailto:r.b.muller@gmail.com >:
L.S,
I have PJSIP/PJSUA running on a raspberry pi. That works ok, I can use my external sip provider to call out.
Since this will be part of a disabled person alarm system later, I want the caller number the call recipient sees not to be the
standard number provided by the sip provider, but an arbitrary number so I can program the receiving phone
to always ring on that number with a custom ring tone, irrespective of general setting on that phone. These are standard
functions on iOS and Android phones.
I hope that explanation makes sense.
The question is how to set the outgoing originator number in pjsua.
All instructions I found reference Asterix, and I do not want to run that.
Advice will be highly appreciated.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com mailto:r.b.muller@gmail.com
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org mailto:pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Am 27.07.2020 um 16:53 schrieb r.b.muller@gmail.com:
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic
should happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
I am unclear as what element of the account struct to set to the
outgoing spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
I actually implemented setting a custom "From" user and display name for
pjsua_call_make_call();
however, I had to patch PJ for this.
Not sure right now if I've pushed this to my public repo, I'll check
tomorrow.
If not, I'll just post the changes here on the mailing list.
Best regards,
Andreas
You need to set it into header list before registration. And I made same
as @ Andreas Wehrmann , just patched it.
пн, 27 июл. 2020 г. в 21:54, r.b.muller@gmail.com:
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic should
happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
I am unclear as what element of the account struct to set to the outgoing
spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
From: pjsip *On Behalf Of *
Sent: Sunday, July 26, 2020 17:12
To: pjsip list pjsip@lists.pjsip.org
Subject: Re: [pjsip] change (spoof) originator phone number in outgoing
call using pjsip/pjsua
You need to set From header when you are registering an account. As far as
I know there was no other methods to set From header (I tried it 2 years
ago).
пт, 24 июл. 2020 г. в 22:07, r.b.muller@gmail.com:
L.S,
I have PJSIP/PJSUA running on a raspberry pi. That works ok, I can use my
external sip provider to call out.
Since this will be part of a disabled person alarm system later, I want
the caller number the call recipient sees not to be the
standard number provided by the sip provider, but an arbitrary number so I
can program the receiving phone
to always ring on that number with a custom ring tone, irrespective of
general setting on that phone. These are standard
functions on iOS and Android phones.
I hope that explanation makes sense.
The question is how to set the outgoing originator number in pjsua.
All instructions I found reference Asterix, and I do not want to run that.
Advice will be highly appreciated.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
On 27.07.20 19:08, Andreas Wehrmann wrote:
Am 27.07.2020 um 16:53 schrieb r.b.muller@gmail.com:
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic
should happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a08473de6401e966d23f34d3a9a05bdd0
I am unclear as what element of the account struct to set to the
outgoing spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
I actually implemented setting a custom "From" user and display name
for pjsua_call_make_call();
however, I had to patch PJ for this.
Not sure right now if I've pushed this to my public repo, I'll check
tomorrow.
If not, I'll just post the changes here on the mailing list.
Best regards,
Andreas
Okay, not in my repo.
I modified pjsua_call_make_call() and the pjsua_call_setting struct in
pjsua.h.
See the attachement for my versions.
All the best,
Andreas
OK, I will try that soonest and let you know the outcome.
Thanks a million for the support.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
Phone: +31 (0)6 5343 5184
-----Original Message-----
From: pjsip On Behalf Of Andreas Wehrmann
Sent: Tuesday, July 28, 2020 07:36
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] change (spoof) originator phone number in outgoing call using pjsip/pjsua
On 27.07.20 19:08, Andreas Wehrmann wrote:
Am 27.07.2020 um 16:53 schrieb r.b.muller@gmail.com:
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic
should happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a0
8473de6401e966d23f34d3a9a05bdd0
<https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a
08473de6401e966d23f34d3a9a05bdd0>
I am unclear as what element of the account struct to set to the
outgoing spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
I actually implemented setting a custom "From" user and display name
for pjsua_call_make_call(); however, I had to patch PJ for this.
Not sure right now if I've pushed this to my public repo, I'll check
tomorrow.
If not, I'll just post the changes here on the mailing list.
Best regards,
Andreas
Okay, not in my repo.
I modified pjsua_call_make_call() and the pjsua_call_setting struct in pjsua.h.
See the attachement for my versions.
All the best,
Andreas
@Andeas, @Somedick
I managed to compile PJSIP with the changes Andreas sent
However, I must admit defeat in understanding how to set the new variables
set_from_display_name, from_display_name and from_user
I am using the demo program "simple_pjsua.c" as a base.
Could you enlighten me on how to set the outging from number.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
-----Original Message-----
From: pjsip On Behalf Of Andreas Wehrmann
Sent: Tuesday, July 28, 2020 07:36
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] change (spoof) originator phone number in outgoing call using pjsip/pjsua
On 27.07.20 19:08, Andreas Wehrmann wrote:
Am 27.07.2020 um 16:53 schrieb r.b.muller@gmail.com:
@ Some Dick
Thanks for taking the time to reply.
If this is done at registration, I assume this is where the magic
should happen, in the account configuration
https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a0
8473de6401e966d23f34d3a9a05bdd0
<https://www.pjsip.org/pjsip/docs/html/structpjsua__acc__config.htm#a
08473de6401e966d23f34d3a9a05bdd0>
I am unclear as what element of the account struct to set to the
outgoing spoofed number.
Can you guide me?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
I actually implemented setting a custom "From" user and display name
for pjsua_call_make_call(); however, I had to patch PJ for this.
Not sure right now if I've pushed this to my public repo, I'll check
tomorrow.
If not, I'll just post the changes here on the mailing list.
Best regards,
Andreas
Okay, not in my repo.
I modified pjsua_call_make_call() and the pjsua_call_setting struct in pjsua.h.
See the attachement for my versions.
All the best,
Andreas
On 28.07.20 17:52, r.b.muller@gmail.com wrote:
@Andeas, @Somedick
I managed to compile PJSIP with the changes Andreas sent
However, I must admit defeat in understanding how to set the new variables
set_from_display_name, from_display_name and from_user
I am using the demo program "simple_pjsua.c" as a base.
Could you enlighten me on how to set the outging from number.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
Sure:
You need to look at how pjsua_call_make_call() works.
If you look at the docs, you'll see that it takes a pointer to
pjsua_call_setting as third parameter,
so looking at the code at simple_pjsua.c, the code would need to look
something like this:
/* If URL is specified, make call to the URL. */
if (argc > 1) {
pjsua_call_setting call_setting;
pjsua_call_setting_default( &call_setting );
/* set From userpart */
pj_cstr( &call_setting.from_user, "12345custom" );
/* if you'd want to set display name as well: /
if( 1 ) / your condition goes here */
{
call_setting.set_from_display_name = PJ_TRUE;
pj_cstr( &call_setting.from_display_name, "Doctor Who" );
}
pj_str_t uri = pj_str(argv[1]);
status = pjsua_call_make_call(acc_id, &uri, &call_setting, NULL,
NULL, NULL);
if (status != PJ_SUCCESS) error_exit("Error making call", status);
}
All the best,
Andreas
@Andreas
Thank you for your help, again.
I have implemented your code, but whatever I do, the caller does not show up on my mobile with the spoofed number
I did monitor the sip exchange with the provider with wireshark, and could not see any mention of the spoofed number or name
The only thing I can think of is that I implemented your initial advice wrong. The simplepj zip file is my working code with the sip user/pass stripped.
To rebuild pjsua I did:
I changed pjproject/pjsip/include/pjsua-lib/pjsua.h line 855-913 to match your advice. I attach the file
I changed PJProject\pjsip\src\pjsua-lib/ pjsua_call.c replacing the pjsua_call_make_call with your code at lines 783-1052, file attached
Then did a make clean, make and sudo make install
I hope you can help.
Can you see where I failed?
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
-----Original Message-----
From: pjsip On Behalf Of Andreas Wehrmann
Sent: Tuesday, July 28, 2020 18:00
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] change (spoof) originator phone number in outgoing call using pjsip/pjsua
On 28.07.20 17:52, r.b.muller@gmail.com wrote:
@Andeas, @Somedick
I managed to compile PJSIP with the changes Andreas sent However, I
must admit defeat in understanding how to set the new variables
set_from_display_name, from_display_name and from_user
I am using the demo program "simple_pjsua.c" as a base.
Could you enlighten me on how to set the outging from number.
Met Vriendelijke Groet, Regards,
Rob Muller
mailto:r.b.muller@gmail.com
Sure:
You need to look at how pjsua_call_make_call() works.
If you look at the docs, you'll see that it takes a pointer to pjsua_call_setting as third parameter, so looking at the code at simple_pjsua.c, the code would need to look something like this:
/* If URL is specified, make call to the URL. */
if (argc > 1) {
pjsua_call_setting call_setting;
pjsua_call_setting_default( &call_setting );
/* set From userpart */
pj_cstr( &call_setting.from_user, "12345custom" );
/* if you'd want to set display name as well: */
if( 1 ) /* your condition goes here */
{
call_setting.set_from_display_name = PJ_TRUE;
pj_cstr( &call_setting.from_display_name, "Doctor Who" );
}
pj_str_t uri = pj_str(argv[1]);
status = pjsua_call_make_call(acc_id, &uri, &call_setting, NULL, NULL, NULL);
if (status != PJ_SUCCESS) error_exit("Error making call", status);
}
All the best,
Andreas
Visit our blog: http://blog.pjsip.org
pjsip mailing list
pjsip@lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org