[pjsip] Outbound proxy

Gergely Kovacs gergo at iptel.org
Wed Nov 28 15:33:56 EST 2007


I'd like to make pjsip-perf send INVITE message with "From:
alice at atlanta.com", "To: bob at boston.com" headers and "bob at boston.com"
RURI to an outbound proxy specified by an IP address.

    pj_str_t proxy = {"sip:root at bug.sip-server.net", 27 };

    status = pjsip_dlg_create_uac( pjsip_ua_instance(),
                   &from,    /* local URI      app.local_uri  */
                   &app.local_contact,    /* local Contact    */
                   dst_uri,        /* remote URI        */
                   &proxy,        /* remote target    */
                   &dlg);        /* dialog        */

If I change remote target parameter of pjsip_dlg_create_uac function to
the address of proxy then the message will be sent to proxy correctly,
but the RURI is changed to the  address of proxy. If I use the
destination URI as remote target then PJSIP tries to resolve the domain
of destination URI which fails because it can't be found in DNS.

I had a look at the source and I've not found any solution for this
problem at pjsip level. (I found that pjsip_transport_send() has a
Destination address parameter but I'd prefer pjsip_inv_send_msg())

How could I send message to an outbound proxy?

Gergely Kovacs

More information about the pjsip mailing list