[OpenSIPS-Users] SIP trace and OpenSIPS-CP 2.0

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Oct 8 08:10:48 CEST 2009


Hi Marc,


marcher wrote:
> Hi Bogdan,
>
> I appreciate you taking the time to answer my basic questions in getting
> opensips-cp functional with my opensips implementation.
>
> I had read the link you included, but its still not clear to me where the
> sip_trace function should be called within the opensips config file.
>   
there is not special place for it - you need to call the sip_trance() 
and set the trace flag when you process the SIP requests - you can do 
this in the very beginning of the script or just before sending the 
request out - it is up to you and up to what kind of traffic you want to 
trace.

For example, if you want to trace only calls to your local subscribers, 
you can add the sip_trace() in the if (ruri==myself) {} block.
> My opensips config file is very straightforward, based heavily on the
> distribution sample, but adding piecemeal the config necessary to integrate
> opensips-cp (mi_xmlrpc, dialplan, drouting and siptrace modules to date) I
> also wish to add in SIP trunking gateways using drouting.
>   
you do not need to put in the opensips script all the functionalities 
required by opensips-cp. You can select in opensips-cp only the tools 
you find useful in your opensips script. If you do not need drouting in 
opensips cfg, simply remove the drouting tool from CP.
> To that end, I am also struggling with the correct opensips config to
> implement drouting such that it works in tandem with the lookup(location)
> functionality.
>   
Could you describe a bit more the logic you want here?
> Does there exist a sample config that I could work from that would achieve
> these goals? I'm surprised the folks that produced opensips-cp didn't post
> an opensips config file that would successfully work in tandem with their
> GUI.
>   
because this is impossible :)...opensips-cp allows you to provision some 
functionality blocks (like dialplan, drouting, nathelper, permissions, 
etc). In your opensips cfg you can combine in millions of ways these 
block to get different overall routing logic.

Regards,
Bogdan

> Thanks again.
>
> Cheers,
>
> Marc
>
>
> Bogdan-Andrei Iancu wrote:
>   
>> Hi Marc,
>>
>> loading the siptrace module is not enough. You need to use the 
>> sip_trace() function and set the trace_flag (for transaction tracing).
>> See:
>>     http://www.opensips.org/html/docs/modules/1.5.x/siptrace.html#id228291
>>
>> Best regards,
>> Bogdan
>>
>> marcher wrote:
>>     
>>> Hi,
>>>
>>> Trying to get sip trace functionality on opensips-cp working also. 
>>>
>>> Toggling the trace on and off from the web interface appears to be
>>> working
>>> fine.
>>>
>>> Oct  7 13:08:59 [2332] DBG:mi_xmlrpc:default_method: starting up.....
>>> Oct  7 13:08:59 [2332] DBG:mi_xmlrpc:default_method: done looking the mi
>>> command.
>>> Oct  7 13:08:59 [2332] DBG:mi_xmlrpc:default_method: done parsing the mi
>>> tree.
>>> Oct  7 13:08:59 [2332] DBG:mi_xmlrpc:default_method: done running the mi
>>> command.
>>> Oct  7 13:08:59 [2332] DBG:mi_xmlrpc:default_method: done building
>>> response.
>>>
>>> However, nothing gets written to the mysql db siptrace table. 
>>>
>>> Hence, nothing gets written to the siptrace table on opensip-cp.
>>>
>>> I'm testing it with SJPhone registering to opensips from the same local
>>> machine.
>>>
>>> I added the following parameters to opensips.cfg
>>>
>>> loadmodule "siptrace.so"
>>>
>>> #------ siptrace db url ----
>>> modparam("siptrace", "db_url","mysql://root:######@localhost/opensips")
>>>
>>> Is this the correct format for the siptrace db_url? 
>>>
>>> The only thing I see in the log that looks related is:
>>>
>>> Oct  7 13:02:53 [2324] DBG:siptrace:trace_sl_onreply_out: trace off...
>>>
>>> For the drouting module, I have the db_url configured as 
>>>
>>> modparam("drouting",
>>> "db_url","mysql://opensips:opensipsrw@localhost/opensips")
>>>
>>> I did try changing the siptrace db_url to this format, but it didn't work
>>> either.
>>>
>>> Any help greatly appreciated.
>>>
>>> Cheers,
>>>
>>> Marc
>>>
>>>
>>> Iulia Bublea-2 wrote:
>>>   
>>>       
>>>> Load the siptrace module in the opensips.cfg and set the db parameter.
>>>>
>>>> Iulia
>>>>
>>>> Gavin Henry wrote:
>>>>     
>>>>         
>>>>> Quick one,
>>>>>
>>>>> I presume you need the sip_trace function in the right place and that
>>>>> you just toggle it on/off via the cp?
>>>>>
>>>>> Also, you will need the db_url if logging to mysql?
>>>>>
>>>>> Thanks.
>>>>>
>>>>>   
>>>>>       
>>>>>           
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>>     
>
>   




More information about the Users mailing list