[OpenSIPS-Users] assigning dialog profiles

Jeff Pyle jpyle at fidelityvoice.com
Mon Mar 9 13:52:56 CET 2009


Brett,

I changed the dialog profile operations to occur just before the INVITE is
sent to the PSTN carrier.  So, in so many words:  create_dialog(),
set_dlg_profile(), then t_relay().

The first time through, no problem.  The second time through (first carrier
hit failure route), create_dialog() returns without an error (so the dialog
re-created successfully or was already there), but the set_dlg_profile()
immediately after the create_dialog() fails with the same error:

 ERROR:dialog:set_dlg_profile: dialog was not yet created - script error
 ERROR:dialog:w_set_dlg_profile: failed to set profile

The exact formulation is:  set_dlg_profile("outbound", "$avp(s:dlgid_out)");
I have verified that $avp(s:dlgid_out) does have a value.

Any thoughts?


Thanks,
Jeff



On 3/8/09 2:19 PM, "Jeff Pyle" <jpyle at fidelityvoice.com> wrote:

> Brett,
> 
> So, if I understand this correctly...  Each time a call hits a failure_route,
> the dialog is destroyed, and with it any profile assignments.  In my case,
> when I select another PSTN carrier, I simply do a create_dialog() again and
> another set_dlg_profile()?
> 
> 
> - Jeff
> 
> 
> 
> On 3/8/09 1:15 PM, "Brett Nemeroff" <brett at nemeroff.com> wrote:
> 
>> Jeff,
>> The dialogs are destroyed automatically upon failure. You don't need to unset
>> the dialog manually unless there is a reason the dialog doesn't fit the
>> profile anymore..
>> 
>> -Brett
>> 
>> On Sun, Mar 8, 2009 at 2:09 PM, Jeff Pyle <jpyle at fidelityvoice.com> wrote:
>>> Hello,
>>> 
>>> I'm configuring Opensips' dialog module to keep count of the number of calls
>>> I have on each outbound PSTN carrier.  Here's my thinking:
>>> 
>>> In request route:
>>> - create_dialog() on new INVITE
>>> - select carrier
>>> - set_dlg_profile() to assign to proper profile with this carrier's value
>>> 
>>> In failure route:
>>> - unset_dlg_profile() to remove from profile, since it failed
>>> - send to original request route to select next carrier, assign profile, etc
>>> 
>>> When I run this, the first set_dlg_profile() works properly, but the
>>> unset_dlg_profile() in the failure route logs:
>>> 
>>>  ERROR:dialog:unset_dlg_profile: dialog was not yet created - script error
>>>  ERROR:dialog:w_unset_dlg_profile: failed to unset profile
>>> 
>>> All subsequent set/unset_dlg_profile give the same error.  Does the dialog
>>> somehow get destroyed when the failure_route is hit?  Is it necessary to
>>> create_dialog() each time the failure_route is hit by sending it back around
>>> to a request route?
>>> 
>>> 
>>> Thanks,
>>> Jeff
>>> 
>>> 
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
>> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090309/573f1816/attachment.htm 


More information about the Users mailing list