Yate Community Forum
Yate server => Other Yate server issues => Topic started by: arts111199 on March 28, 2014, 05:21:46 AM
-
Hi
Could you please provide an example for routing a call based on SIP message in regexroute.conf
Ex.
If Yate receives an INVITE then sending INVITE according to routing table and Yate server gets 480 Temporarily unavailable SIP message then play announcement or route call to another trunk.
-
Hi,
See http://docs.yate.ro/wiki/Call_Forker on how to fork a call.
Here is an example of playing announcement:
^123$=fork;fork.stop=noanswer^;callto.1=sip/sip:123@127.0.0.1;callto.2=|;callto.3=wave/play//myfile.au
The above rule will call on sip to 123@127.0.0.1. If the call fails fork will stop if reason is not 'noanaswer' (480). If the call fails with 480 it will call to wavechan module to play the file myfile.au on incoming call leg.
-
Hi,
thank You Marian,i will have a try.
-
Hi,
Dear Marian,
Could we fix two end causes for to be checked in case of forking like
^123$=fork;fork.stop=noanswer,failure^;callto.1=sip/sip:123@127.0.0.1;callto.2=|;callto.3=wave/play//myfile.au
thank you
-
fork.stop is a regexp. If you want to match a list use the pipe char to separate items.
You may set multiple causes like: noanswer\|failure
Keep in mind: the char ^ added at regexp end reverses the condition, i.e. fork will stop if not matched.
-
Thanks a lot Marian,
I'll try and let You know results
-
Dear Marian
I have added with pipe character but in fact while receiving 480 SIP response the fork stops
^+1\(.*\)$=fork;fork.stop=noconn\|noanswer^;callto.1=sip/sip:1\1@11.22.33.44;callto.2=|;callto.3=sip/sip:1\1@55.66.77.88;
-
Please attach yate log.
I mean full log, including call fork start and end.
-
Dear Marian,
Before i can collect logs because its a live server with huge amount of simultaneous calls could You PLEASE answer my new Topic "Yate changing RTP port ".
Its very important for us.
Thanks for understanding.