Hi all,
I'm looking for a mechanism to let users personalize the behaviour of their profile, uploading configuration changes to Kamailio. For example voice mail redirecion, time-based routing, etc. I'm testing CPL scripts (cpl-c module with Kamailio 4.1.3), but I have problems with the behaviour of some features. "reject" and "redirect" seem to be working fine, but "proxy" is not working.
¿Has anybody experienced the same problems? I could hardly find any post regarding CPL scripting with Kamailio. What are the most commonly used alternatives for this purpose with Kamailio? ¿SIP CGI? ¿any other?
Best regards.
Luis.
Hello,
On 05/07/14 10:05, LAA wrote:
Hi all,
I'm looking for a mechanism to let users personalize the behaviour of their profile, uploading configuration changes to Kamailio. For example voice mail redirecion, time-based routing, etc. I'm testing CPL scripts (cpl-c module with Kamailio 4.1.3), but I have problems with the behaviour of some features. "reject" and "redirect" seem to be working fine, but "proxy" is not working.
can you give the log messages from syslog when using proxy with cpl script and you have debug=3 in kamailio.cfg?
Cheers, Daniel
¿Has anybody experienced the same problems? I could hardly find any post regarding CPL scripting with Kamailio. What are the most commonly used alternatives for this purpose with Kamailio? ¿SIP CGI? ¿any other?
Best regards.
Luis.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel,
I have pasted at the end of this e-mail the log messages with debug=3. I can't find any message regarding the CPL script in the log file, and I don't receive any CPL error message neither when I upload the script to the server neither when I make the call. It is the script that I'm testig:
<?xml version="1.0" encoding="UTF-8"?> <cpl> <subaction id="desvio_buzon"> <location url="sip:voicemail4111@192.168.0.197"> <proxy/> </location> </subaction> <incoming> <location url="sip:4111@192.168.0.197"> <proxy timeout="8"> <busy> <sub ref="desvio_buzon"/> </busy> <noanswer> <sub ref="desvio_buzon"/> </noanswer> </proxy> </location> </incoming> </cpl>
It was supposed to forward the call on busy or no answer to the voicemail system, but the behaviour is different. When the INVITE arrives to the proxy, instead of forwarding it to the UAS Kamailio it forwarding the message to its own IP and port:
|Time | 192.168.3.20 | | | | 192.168.0.197 | |2,732 | INVITE SDP (g711A g711U telephone-eventRTPType...1) |SIP From: "Terminal_4095" < sip:4095@192.168.0.197 To:<sip:4111@192.168.0.197 | |(1) ------------------> (5060) | |2,734 | 407 Proxy Authentication Required |SIP Status | |(1) <------------------ (5060) | |2,735 | ACK | |SIP Request | |(1) ------------------> (5060) | |2,736 | INVITE SDP (g711A g711U telephone-eventRTPType...1) |SIP From: "Terminal_4095" < sip:4095@192.168.0.197 To:<sip:4111@192.168.0.197 | |(1) ------------------> (5060) | |2,739 | 100 trying -- your call is important to us |SIP Status | |(1) <------------------ (5060) | |2,744 | | INVITE SDP (g711A g711U telephone-eventRTPType...1)SIP Request | | |(5060) ------------------>(5060) |2,748 | | 407 Proxy Authentication RequiredSIP Status | | |(5060) ------------------>(5060) |2,749 | | ACK |SIP Request | | |(5060) ------------------>(5060) |2,749 | 407 Proxy Authentication Required |SIP Status | |(1) <------------------ (5060) | |2,759 | ACK | |SIP Request | |(1) ------------------> (5060) |
I'm running CPL scripts like this:
# account only INVITEs if (is_method("INVITE")) { setflag(FLT_ACC); # do accounting #!ifdef WITH_CPL if(!cpl_run_script("incoming","is_stateful")) { # script execution failed t_reply("500","CPL script execution failed"); }; #!endif
}
Am I forgetting something?
Best Regards
Luis.
Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:627]: parse_msg(): uri: sip:4111@192.168.0.197 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4249]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:629]: parse_msg(): version: <SIP/2.0> Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4249]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 235, <rport> = <n/a>; state=6 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4249]: DEBUG: <core> [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_via.c:1284]: parse_via_param(): Found param type 232, <branch> = <z9hG4bKassidktr>; state=16 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4249]: DEBUG: <core> [receive.c:296]: receive_msg(): receive_msg: cleaning up Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_via.c:2672]: parse_via(): end of header reached, state=5 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:513]: parse_headers(): parse_headers: Via found, flags=2 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:515]: parse_headers(): parse_headers: this is the first via Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4247]: DEBUG: <core> [receive.c:296]: receive_msg(): receive_msg: cleaning up Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [receive.c:152]: receive_msg(): After parse_msg... Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [receive.c:193]: receive_msg(): preparing to run routing scripts... Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=8661e39ff82910c16e76248ab1f6bbfe.08a3 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:190]: get_hdr_field(): DEBUG: get_hdr_field: <To> [68]; uri=[sip:4111@192.168.0.197] Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:192]: get_hdr_field(): DEBUG: to body [< sip:4111@192.168.0.197>] Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: maxfwd [mf_funcs.c:85]: is_maxfwd_present(): value = 70 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:170]: get_hdr_field(): get_hdr_field: cseq <CSeq>: <705> <ACK> Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:204]: get_hdr_field(): DEBUG: get_hdr_body : content_length=0 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/msg_parser.c:106]: get_hdr_field(): found end of header Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_addr_spec.c:176]: parse_to_param(): DEBUG: add_param: tag=olakr Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [parser/parse_addr_spec.c:893]: parse_addr_spec(): end of header reached, state=29 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: sanity [mod_sanity.c:255]: w_sanity_check(): sanity checks result: 1 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [msg_translator.c:204]: check_via_address(): check_via_address(192.168.0.167, 192.168.0.167, 0) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: siputils [checks.c:106]: has_totag(): totag found Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: rr [loose.c:113]: find_first_route(): No Route headers found Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: rr [loose.c:929]: loose_route(): There is no Route HF Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_lookup.c:1072]: t_check_msg(): DEBUG: t_check_msg: msg id=5 global id=4 T start=0xffffffff Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_lookup.c:527]: t_lookup_request(): t_lookup_request: start searching: hash=14256, isACK=1 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_lookup.c:470]: matching_3261(): DEBUG: RFC3261 transaction matched, tid=assidktr Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_lookup.c:726]: t_lookup_request(): DEBUG: t_lookup_request: transaction found (T=0xb35662a8) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_lookup.c:1141]: t_check_msg(): DEBUG: t_check_msg: msg id=5 global id=5 T end=0xb35662a8 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_reply.c:1663]: cleanup_uac_timers(): DEBUG: cleanup_uac_timers: RETR/FR timers reset Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [timer.c:595]: timer_add_safe(): timer_add called on an active timer 0xb35662f0 (0xb33b5888, 0xb33b5888), flags 201 Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: tm [t_funcs.c:180]: put_on_wait(): tm: put_on_wait: transaction 0xb35662a8 already on wait Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [usr_avp.c:644]: destroy_avp_list(): DEBUG:destroy_avp_list: destroying list (nil) Jul 8 13:16:24 /usr/local/sbin/kamailio[4246]: last message repeated 5 times Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [xavp.c:448]: xavp_destroy_list(): destroying xavp list (nil) Jul 8 13:16:24 kamailio /usr/local/sbin/kamailio[4246]: DEBUG: <core> [receive.c:296]: receive_msg(): receive_msg: cleaning up root@kamailio:/var/log#
2014-07-07 7:49 GMT+02:00 Daniel-Constantin Mierla miconda@gmail.com:
Hello,
On 05/07/14 10:05, LAA wrote:
Hi all,
I'm looking for a mechanism to let users personalize the behaviour of their profile, uploading configuration changes to Kamailio. For example voice mail redirecion, time-based routing, etc. I'm testing CPL scripts (cpl-c module with Kamailio 4.1.3), but I have problems with the behaviour of some features. "reject" and "redirect" seem to be working fine, but "proxy" is not working.
can you give the log messages from syslog when using proxy with cpl script and you have debug=3 in kamailio.cfg?
Cheers, Daniel
żHas anybody experienced the same problems? I could hardly find any post regarding CPL scripting with Kamailio. What are the most commonly used alternatives for this purpose with Kamailio? żSIP CGI? żany other?
Best regards.
Luis.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing listsr-users@lists.sip-router.orghttp://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla - http://www.asipto.comhttp://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users