Hi guy. sorry for the confusion. I'll try to reorganize it.
In kamailio.cfg I added if ($rU=="12345") { if(is_method("INVITE")) { #record_route(); $ru = "sip:prompt-1000@" + $sel(cfg_get.voicemail.srv_ip) + ":" + $sel(cfg_get.voicemail.srv_port); route(RELAY); exit; } } in freeswitch/conf/dialplan/default.xml, i added <extension name="prompt-offline"> <condition field="destination_number" expression="^prompt-(.+)$"> <action application="bridge" data="user/$1@${domain_name}"/> <action application="playback" data="ivr/ivr-user_busy.wav"/> </condition> </extension> sofia log: [NOTICE] switch_channel.c:1077 New Channel sofia/internal/13112345678@35.202.167.70 [848d0dd5-0513-41bd-982c-45a2a886e194] [INFO] mod_dialplan_xml.c:635 Processing 13112345678 <13112345678>->prompt-1000 in context public [NOTICE] switch_ivr.c:1863 Transfer sofia/internal/13112345678@35.202.167.70 to XML[prompt-1000@default] [INFO] mod_dialplan_xml.c:635 Processing 13112345678 <13112345678>->prompt-1000 in context default [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type [error] cause: [USER_NOT_REGISTERED] [NOTICE] switch_ivr_originate.c:2759 Cannot create outgoing channel of type [user] cause: [USER_NOT_REGISTERED] ------------------------------------------------------------------------ SIP/2.0 480 Temporarily Unavailable ...... Reason: SIP;cause=606;text="USER_NOT_REGISTERED" ------------------------------------------------------------------------ However, if i delete: <action application="bridge" data="user/$1@${domain_name}"/>, the FS returns 488 instead of 480. Reason: Q.850;cause=88;text="INCOMPATIBLE_DESTINATION" Thanks At 2017-09-22 15:31:51, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote: Hi, You need to add: <extension name="prompt-offline"> <condition field="destination_number" expression="^offline$"> <action application="playback" data="/usr/local/freeswitch/sounds/music/8000/suite-espanola-op-47-leyenda.wav"/> </condition> </extension> to conf/dialplan/default.xml in your code, you had extra line what was sending a call to 1000 extension. With kind regards, Jurijs On Fri, Sep 22, 2017 at 10:29 AM, Jurijs Ivolga <jurijs.ivo...@gmail.com> wrote: Hi, So, problem is not related to record route but to config of freeswitch. Not sure what you wrote in mail above, but you need to add code what provided Sergey to: /usr/local/freeswitch/conf/dialplan/default.xml With kind regards, Jurijs On Fri, Sep 22, 2017 at 10:11 AM, 赵国杰 <zhaoguojie2...@163.com> wrote: Hello, Thanks for the heads up. The siptrace does help. Now the FS returns(with or without record_route();): SIP/2.0 480 Temporarily Unavailable Reason: SIP;cause=606;text="USER_NOT_REGISTERED" I have generate offline.xml under conf/directory/default. Where did i miss? Thanks At 2017-09-22 14:53:06, "Jurijs Ivolga" <jurijs.ivo...@gmail.com> wrote: Hi, Sip trace from Freeswitch will help, but I think you need to insert Record-Route, try in following way: if ($rU=="12345") { if(is_method("INVITE")) { record_route(); $ru = "sip:" + "offline" + "@" + $sel(cfg_get.voicemail.srv_ip) + ":" + $sel(cfg_get.voicemail.srv_port); route(RELAY); exit; } } With kind regards, Jurijs On Fri, Sep 22, 2017 at 7:19 AM, 赵国杰 <zhaoguojie2...@163.com> wrote: Hello I added below code to let kamailio route invite to freeswitch: if ($rU=="12345") { if(is_method("INVITE")) { $ru = "sip:" + "offline" + "@" + $sel(cfg_get.voicemail.srv_ip) + ":" + $sel(cfg_get.voicemail.srv_port); route(RELAY); exit; } } in freeswitch dialplan/default.xml, i added <extension name="prompt-offline"> <condition field="destination_number" expression="^offline$"> <action application="bridge" data="user/1000@${domain_name}"/> <action application="playback" data="/usr/local/freeswitch/sounds/music/8000/suite-espanola-op-47-leyenda.wav"/> </condition> </extension> when i dialed 12345 on sip client, I can see the invite package to freeswitch, and that's it. No package coming back from freeswitch. Eventually, the sip client timeout. I was hoping that when i dial 12345, "suite-espanola-op-47-leyenda.wav" will be played. What did i do wrong? Thanks At 2017-09-20 19:32:14, "Sergey Safarov" <s.safa...@gmail.com> wrote: You can add this example to dialplan and make test <extension name="call_user"> <condition> <action application="set" data="continue_on_fail=NORMAL_TEMPORARY_FAILURE,USER_BUSY,NO_ROUTE_DESTINATION,SUBSCRIBER_ABSENT"/> <action application="bridge" data="user/3...@example.org"/> <action application="playback" data="ivr/ivr-user_busy.wav"/> </condition> </extension> ср, 20 сент. 2017 г. в 10:14, 赵国杰 <zhaoguojie2...@163.com>: Hello Sergey, I installed freeswitch, what should i do next? At 2017-09-19 12:07:23, "Sergey Safarov" <s.safa...@gmail.com> wrote: This can be implemenred using freeswitch. Ping me directly after you install freeswith on linux and configure ssh remote access вт, 19 сент. 2017 г., 6:27 赵国杰 <zhaoguojie2...@163.com>: Thanks Daniel, I've done some digging, and from Andrew Prokop's blog, it says this envolves early midia. Usually this is done by reply a 183 to the caller with media ip and port in the SDP. This makes sense but i still have no idea how to generate 183 response with embedded SDP. At 2017-09-18 18:05:46, "Daniel Tryba" <d.tr...@pocos.nl> wrote: >On Mon, Sep 18, 2017 at 03:37:22PM +0800, 赵国杰 wrote: >> I want the caller to play a short audio(like "the number your are >> calling is busy") when the callee declines the call. How can i do that? > >You need to check for the status codes in a failure route and then >somehow generate audio somewhere, which is out of the scope of kamailio >(maybe rtpproxy can do this, otherwise use something like asterisk): > >failure_route[MANAGE_FAILURE] { >if (t_check_status("486")) >{ > $du=null; > $ru="busymess...@asterisk.example.org"; > route(RELAY); > exit; >} > >_______________________________________________ >Kamailio (SER) - Users Mailing List >sr-users@lists.kamailio.org >https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
_______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users