Re: change (spoof) originator phone number in outgoing call using pjsip/pjsua

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

 



@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@xxxxxxxxx

-----Original Message-----
From: pjsip On Behalf Of Andreas Wehrmann
Sent: Tuesday, July 28, 2020 18:00
To: pjsip@xxxxxxxxxxxxxxx
Subject: Re:  change (spoof) originator phone number in outgoing call using pjsip/pjsua

On 28.07.20 17:52, r.b.muller@xxxxxxxxx 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@xxxxxxxxx

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@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

<<attachment: simplepj.zip>>

Attachment: pjsua.h
Description: Binary data

Attachment: pjsua_call.c
Description: Binary data

_______________________________________________
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