[Spce-user] I'm stuck on routing MESSAGE (SIP SIMPLE)
Carsten Bock
carsten at ng-voice.com
Mon Jul 4 10:27:20 EDT 2011
Hi,
please look at the examples in the DokuWiki of Kamailio:
http://sip-router.org/wiki/cookbooks/core-cookbook/devel#switch
You should add a "break;" as in the example of the DokuWiki:
switch($retcode)
{
case -1:
log("process INVITE requests here\n");
break;
case 1:
log("process REGISTER requests here\n");
break;
case 2:
case 3:
log("process SUBSCRIBE and NOTIFY requests here\n");
break;
default:
log("process other requests here\n");
}
Carsten
2011/7/4 Skyler <skchopperguy at gmail.com>:
> Hi all,
>
>
>
> Trying to route MESSAGE by user location, my various attempts are failing
> miserably. At best I am getting WARNING: tm [t_lookup.c:1543]: WARNING:
> script writer didn't release transaction.
>
>
>
> How should I be writing this so as to route MESSAGEs to by location
> correctly in proxy.cfg.tt2? Any help is greatly appreciated.
>
>
>
>
>
> if(is_method("MESSAGE"))
>
> {
>
> if (!lookup("location")) {
>
> switch ($rc) {
>
> case -1:
>
> case -3:
>
> t_newtran();
>
> t_reply("404", "Not Found");
>
> exit;
>
> case -2:
>
> sl_send_reply("405", "Method Not Allowed");
>
> exit;
>
> }
>
> }
>
> }
>
>
>
>
>
> TIA,
>
> S.
>
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> http://lists.sipwise.com/listinfo/spce-user
>
>
--
Carsten Bock
http://www.ng-voice.com
mailto:carsten at ng-voice.com
Schomburgstr. 80
22767 Hamburg
Germany
Mobile +49 179 2021244
Office +49 40 34927219
Fax +49 40 34927220
More information about the Spce-user
mailing list