How to set Call-ID and Max-Forward field when using dlg api?

GL
Gang Liu
Thu, Aug 14, 2008 9:41 AM

When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an outgoing
call, how can I specify my own Call-ID and Max-Forward values of INVITE
request?

regards,
Gang

When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an outgoing call, how can I specify my own Call-ID and Max-Forward values of INVITE request? regards, Gang
BP
Benny Prijono
Thu, Aug 14, 2008 9:48 AM

On Thu, Aug 14, 2008 at 10:41 AM, Gang Liu gangban.lau@gmail.com wrote:

When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an
outgoing call, how can I specify my own Call-ID and Max-Forward values of
INVITE request?

Max-Forwards value is currently sem-hardcoded as PJSIP_MAX_FORWARDS_VALUE
macro in sip_config.h, and it only applies for all requests sent by pjsip.

For function to set Call-ID in the dialog, that has been identified by this
ticket: http://trac.pjsip.org/repos/ticket/442, but haven't had time to
implement it. Lacking this, you can just override dlg->call_id.id value
after creating the UAC dialog.

cheers
Benny

On Thu, Aug 14, 2008 at 10:41 AM, Gang Liu <gangban.lau@gmail.com> wrote: > When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an > outgoing call, how can I specify my own Call-ID and Max-Forward values of > INVITE request? > > Max-Forwards value is currently sem-hardcoded as PJSIP_MAX_FORWARDS_VALUE macro in sip_config.h, and it only applies for all requests sent by pjsip. For function to set Call-ID in the dialog, that has been identified by this ticket: http://trac.pjsip.org/repos/ticket/442, but haven't had time to implement it. Lacking this, you can just override dlg->call_id.id value after creating the UAC dialog. cheers Benny > regards, > Gang > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >
GL
Gang Liu
Thu, Aug 14, 2008 2:57 PM

Yes. I found function init_request_throw() in sip_util.c will add hardcoded
max-forwardes header created by sip endpoint into request.
It is hard to pass value into this low level function.
Thanks.

regards,
Gang

On Thu, Aug 14, 2008 at 5:48 PM, Benny Prijono bennylp@pjsip.org wrote:

On Thu, Aug 14, 2008 at 10:41 AM, Gang Liu gangban.lau@gmail.com wrote:

When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an
outgoing call, how can I specify my own Call-ID and Max-Forward values of
INVITE request?

Max-Forwards value is currently sem-hardcoded as PJSIP_MAX_FORWARDS_VALUE
macro in sip_config.h, and it only applies for all requests sent by pjsip.

For function to set Call-ID in the dialog, that has been identified by this
ticket: http://trac.pjsip.org/repos/ticket/442, but haven't had time to
implement it. Lacking this, you can just override dlg->call_id.id value
after creating the UAC dialog.

cheers
Benny

Yes. I found function init_request_throw() in sip_util.c will add hardcoded max-forwardes header created by sip endpoint into request. It is hard to pass value into this low level function. Thanks. regards, Gang On Thu, Aug 14, 2008 at 5:48 PM, Benny Prijono <bennylp@pjsip.org> wrote: > On Thu, Aug 14, 2008 at 10:41 AM, Gang Liu <gangban.lau@gmail.com> wrote: > >> When I use pjsip_dlg_create_uac() and pjsip_inv_invite() to make an >> outgoing call, how can I specify my own Call-ID and Max-Forward values of >> INVITE request? >> >> > Max-Forwards value is currently sem-hardcoded as PJSIP_MAX_FORWARDS_VALUE > macro in sip_config.h, and it only applies for all requests sent by pjsip. > > For function to set Call-ID in the dialog, that has been identified by this > ticket: http://trac.pjsip.org/repos/ticket/442, but haven't had time to > implement it. Lacking this, you can just override dlg->call_id.id value > after creating the UAC dialog. > > cheers > Benny > > > >> regards, >> Gang >> >> _______________________________________________ >> 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 > >