[OpenSIPS-Users] how to implement call forward after 486 (busy) with 181 message

Daniel Ribeiro ribeiro.danielf at gmail.com
Fri Mar 19 21:54:45 CET 2010


Correction... t_reply - t_reply("181","Call Is Being Forwarded"); - works
fine.
I made a mistake and collect packets at the wrong interface.
Thanks Brett.



On Fri, Mar 19, 2010 at 4:24 PM, Daniel Ribeiro
<ribeiro.danielf at gmail.com>wrote:

> I collect the sip messages at wireshark.
>
> No.     Time        Source                Destination           Protocol
> Info
>       3 0.090288    192.168.1.200         192.168.1.2           SIP/SDP
> Request: INVITE sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>, with session
> description
>
>       4 0.132793    192.168.1.2           192.168.1.200         SIP
> Status: 100 Trying
>       5 0.142907    192.168.1.2           192.168.1.200         SIP
> Status: 486 Busy Here
>       6 0.143218    192.168.1.200         192.168.1.2           SIP
> Request: ACK sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>       7 0.145198    192.168.1.200         192.168.1.2           SIP/SDP
> Request: INVITE sip:13 at 192.168.1.2 <sip%3A13 at 192.168.1.2>, with session
> description
>
>       8 0.165471    192.168.1.2           192.168.1.200         SIP
> Status: 482 Loop Detected
>       9 0.166064    192.168.1.200         192.168.1.2           SIP
> Request: ACK sip:13 at 192.168.1.2 <sip%3A13 at 192.168.1.2>
>
>
>
>
>
> On Fri, Mar 19, 2010 at 4:16 PM, Brett Nemeroff <brett at nemeroff.com>wrote:
>
>> Your log wouldn't show if it worked or not.. have you watched a sip trace?
>>
>> Thanks,
>> Brett
>>
>>
>> On Fri, Mar 19, 2010 at 12:54 PM, Daniel Ribeiro <
>> ribeiro.danielf at gmail.com> wrote:
>>
>>> I try that but don't work.
>>>
>>>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: new branch
>>> at sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: onreply
>>> invite
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: onreply
>>> invite
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply error 486
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: ACC: call
>>> missed:
>>> timestamp=1269021181;method=INVITE;from_tag=1744708490;to_tag=192.168.1.2+1+1080000+b729333f;call_id=
>>> 72768D14-A5DB-EDCD-DD18-C6CFB4EAD16D at 192.168.1.200;code=486;reason=Busy
>>> Here
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: Redirect
>>> busy calls
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: before
>>> revert sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: after
>>> revert sip:11 at 192.168.1.200 <sip%3A11 at 192.168.1.200>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: forwarded
>>> to: sip:13 at 192.168.1.200 <sip%3A13 at 192.168.1.200>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: new branch
>>> at sip:13 at 192.168.1.200 <sip%3A13 at 192.168.1.200>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: new branch
>>> at sip:13 at 192.168.1.2 <sip%3A13 at 192.168.1.2>
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: onreply
>>> invite
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: onreply
>>> invite
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: ACC: call
>>> missed:
>>> timestamp=1269021181;method=INVITE;from_tag=1744708490;to_tag=192.168.1.2+1+1080000+b729333f;call_id=
>>> 72768D14-A5DB-EDCD-DD18-C6CFB4EAD16D at 192.168.1.200;code=482;reason=Loop
>>> Detected
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: incoming
>>> reply
>>> Mar 19 14:53:01 danielribeiro /usr/local/sbin/opensips[26630]: onreply
>>> invite
>>>
>>>
>>> On Fri, Mar 19, 2010 at 2:17 PM, Brett Nemeroff <brett at nemeroff.com>wrote:
>>>
>>>> Oh, right.. failure routes don't make sense in stateless. maybe t_reply
>>>> then?
>>>> t_reply("181","Call Is Being Forwarded")
>>>> ??
>>>> -brett
>>>>
>>>>
>>>> On Fri, Mar 19, 2010 at 12:13 PM, Daniel Ribeiro <
>>>> ribeiro.danielf at gmail.com> wrote:
>>>>
>>>>> This method isn't permitted at failure_route.
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Mar 19, 2010 at 2:11 PM, Daniel Ribeiro <
>>>>> ribeiro.danielf at gmail.com> wrote:
>>>>>
>>>>>> One more detail...
>>>>>> I'm trying to implement this scenario.
>>>>>> http://www.tech-invite.com/Ti-sip-service-8.html#fig4
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Mar 19, 2010 at 2:05 PM, Daniel Ribeiro <
>>>>>> ribeiro.danielf at gmail.com> wrote:
>>>>>>
>>>>>>> Hello guys,
>>>>>>>
>>>>>>> I'm trying to implement the call forward after a busy message
>>>>>>> following some internet examples but without success.
>>>>>>> How can I generate an 181 message after a error 486.
>>>>>>> I'm trying with this cfg for failure_route.
>>>>>>>
>>>>>>> failure_route[1] {
>>>>>>>     if (t_was_cancelled()) {
>>>>>>>         exit;
>>>>>>>     }
>>>>>>>
>>>>>>>     # uncomment the following lines if you want to block client
>>>>>>>     # redirect based on 3xx replies.
>>>>>>>     ##if (t_check_status("3[0-9][0-9]")) {
>>>>>>>     ##t_reply("404","Not found");
>>>>>>>     ##    exit;
>>>>>>>     ##}
>>>>>>>
>>>>>>>     # Redirect busy calls to another destination
>>>>>>>     if (t_check_status("486")) {
>>>>>>>         xlog("Redirect busy calls\n");
>>>>>>>         xlog("before revert $ru\n");
>>>>>>>         revert_uri();
>>>>>>>         xlog("after revert $ru\n");
>>>>>>>         #If there is an AVP called fwdbusy send to it
>>>>>>>         if(avp_db_load("$ru","$avp(s:fwdbusy)")) {
>>>>>>>             $ru = $avp(s:fwdbusy);
>>>>>>>             xlog("forwarded to: $ru");
>>>>>>>         }
>>>>>>>         t_relay();
>>>>>>>     }
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> The log output was:
>>>>>>> Mar 19 13:34:49 danielribeiro /usr/local/sbin/opensips[26188]: new
>>>>>>> branch at sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>>>>>>> Mar 19 13:34:49 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:34:49 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:34:50 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:34:50 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:34:58 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:34:58 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:34:58 danielribeiro /usr/local/sbin/opensips[26188]: ACC:
>>>>>>> transaction answered:
>>>>>>> timestamp=1269016498;method=INVITE;from_tag=286496395;to_tag=192.168.1.2+1+1060000+dca82b99;call_id=
>>>>>>> 3F0187FE-C3FE-E6DF-A2F3-457DF8E17B14 at 192.168.1.200;code=200;reason=OK
>>>>>>>
>>>>>>> Mar 19 13:34:58 danielribeiro /usr/local/sbin/opensips[26188]: ACC:
>>>>>>> request acknowledged:
>>>>>>> timestamp=1269016498;method=ACK;from_tag=286496395;to_tag=192.168.1.2+1+1060000+dca82b99;call_id=
>>>>>>> 3F0187FE-C3FE-E6DF-A2F3-457DF8E17B14 at 192.168.1.200;code=200;reason=OK
>>>>>>>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: new
>>>>>>> branch at sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply error 486
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: ACC:
>>>>>>> call missed:
>>>>>>> timestamp=1269016500;method=INVITE;from_tag=c298fc07-e331-df11-91ee-002421899f1c;to_tag=192.168.1.2+1+1080000+b729333f;call_id=fc95fc07-e331-df11-91ee-002421899f1c at danielribeiro;code=486;reason=Busy
>>>>>>> Here
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> Redirect busy calls
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: before
>>>>>>> revert sip:11 at 192.168.1.2 <sip%3A11 at 192.168.1.2>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: after
>>>>>>> revert sip:11 at 192.168.1.200 <sip%3A11 at 192.168.1.200>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> forwarded to: sip:13 at 192.168.1.200 <sip%3A13 at 192.168.1.200>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: new
>>>>>>> branch at sip:13 at 192.168.1.200 <sip%3A13 at 192.168.1.200>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: new
>>>>>>> branch at sip:13 at 192.168.1.2 <sip%3A13 at 192.168.1.2>
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]: ACC:
>>>>>>> call missed:
>>>>>>> timestamp=1269016500;method=INVITE;from_tag=c298fc07-e331-df11-91ee-002421899f1c;to_tag=192.168.1.2+1+1080000+b729333f;call_id=fc95fc07-e331-df11-91ee-002421899f1c at xxxxxxx;code=482;reason=Loop
>>>>>>> Detected
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> incoming reply
>>>>>>> Mar 19 13:35:00 danielribeiro /usr/local/sbin/opensips[26188]:
>>>>>>> onreply invite
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel Ribeiro
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Daniel Ribeiro
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Daniel Ribeiro
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Daniel Ribeiro
>>>
>>> _______________________________________________
>>> 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
>>
>>
>
>
> --
> Daniel Ribeiro
>



-- 
Daniel Ribeiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20100319/443ca1e3/attachment-0001.htm 


More information about the Users mailing list