[Freeswitch-users] Some Newbie questions about dialplan and local Sip registration

Tihomir Culjaga tculjaga at gmail.com
Fri Sep 18 11:04:24 PDT 2009


hi Filip,


for calling a user... please read this first:
http://wiki.freeswitch.org/wiki/FreeSwitch_Dialplan_XML#Dialing_A_Registered_User
for making a GW register into e.g. asterisk please use this:


<include>
  <gateway name="gw01">
  <param name="username" value="USERNAME_ON_ASTERISK"/>
  <param name="realm" value="ASTERISK_IP_ADDRESS"/>
  <param name="password" value="PASSWORD_ON_ASTERISK"/>
  <param name="register" value="true"/>
  <param name="caller-id-in-from" value="true"/>
  </gateway>
</include>

this should be enough to register the GW... after that please read this:
http://wiki.freeswitch.org/wiki/FreeSwitch_Dialplan_XML#Dialing_through_gateways


in your case it will be something like this:

<extension name="dialGW">
  <condition field="destination_number"
expression="^(NUMBER_TO_SEND_TO_ASTERISK)$">
    <action application="bridge" data="sofia/gateway/gw01/$1"/>
  </condition>
</extension>









On Fri, Sep 18, 2009 at 4:22 PM, Filip Lyncker <lyncker at lyth.de> wrote:

> Hi List,
>
> for the first experiments with freeswitch I downloaded the Windows
> installation.
> Now Im trying to get my 2 Sipphones get connected to. Later I want
> connect the freeswitch to my asterisk gateway.
>
> I find the examples pretty complex therfore Im trying to build up a
> simple solution to understand the functions from the scratch ..
>
> my current problem is , that I cant route my local sips to each other (
> registration seems to work now).
> the next is , that freeshwitch is not able to connect to asterisk. but I
> will describe this later.
>
> I installed in the Directory a xml file ( called 22.xml) with the
> following content :
>
> <include>
> <domain name="$${domain}">
>  <user id="22" mailbox="22">
>    <params>
>      <param name="password" value="Xk21%"></param>
>      <param name="vm-password" value="22"></param>
>      <param name="sip-port" value="5060"></param>
>
>    </params>
>    <variables>
>      <variable name="accountcode" value="22"></variable>
>      <variable name="user_context" value="default"></variable>
>      <variable name="effective_caller_id_name" value="Extension
> 22"></variable>
>      <variable name="effective_caller_id_number" value="22"></variable>
>    </variables>
>  </user>
>  <user id="24" mailbox="24">
>    <params>
>      <param name="password" value="dudeldum"></param>
>      <param name="vm-password" value="24"></param>
>      <param name="sip-port" value="5060"></param>
>
>    </params>
>    <variables>
>      <variable name="accountcode" value="24"></variable>
>      <variable name="user_context" value="default"></variable>
>      <variable name="effective_caller_id_name" value="Extension
> 24"></variable>
>      <variable name="effective_caller_id_number" value="24"></variable>
>    </variables>
>  </user>
>  </domain>
> </include>
>
> This seems to be ok now. Now I want to dial from 22 to 24 , wherefore I
> configured this dialplan :
>
> <include>
>  <context name="any">
>   <condition field="destination_number" expression="^(2[0-9])$">
>
>      <action application="bridge" data="user/${dialed_extension}"/>
>
>   </condition>
> </include>
>
> wich doesnt work , mybe b/c the user/${dialed_extension} I dont know...
> Freeswitch says:
> [INFO] switch_core_state_machine.c:136 No Route, Aborting
> [NOTICE] switch_core_state_machine.c:137 Hangup
> sofia/internal/24 at 192.168.1.34 [CS_ROUTING] [NO_ROUTE_DESTINATION]
> [NOTICE] switch_core_session.c:1086 Session 17
> (sofia/internal/24 at 192.168.1.34) Ended
> [NOTICE] switch_core_session.c:1088 Close Channel
> sofia/internal/24 at 192.168.1.34 [CS_DESTROY]
>
> Im sure , for you guys this cant be a big deal;)
>
>
> Next Point is my Asterisk registration , mybe you can help me out here
> to .. :
>
> In the sip-profiles/external I installed the my_asterisk.xml with that
> content :
>
> <include>
>  <gateway name="asterisk">
>    <param name="username" value="28"></param>
>    <param name="password" value="test"></param>
>    <param name="realm" value="28"></param>
>    <param name="proxy" value="192.168.1.119"></param>
>    <param name="register" value="true"></param>
>  </gateway>
> </include>
>
> Freeswitch allways complains a timeout error :
>  [ERR] sofia_reg.c:1460 asterisk Registration Failed with status Request
> Timeout [408]. failure #17
>  [WARNING] sofia_reg.c:364 asterisk Failed Registration, setting retry
> to 540 seconds.
>
> it seems that It cant connect ( I also tried out to explicit set the
> port to 5060 b/c I read something about 5080 .. : <param name="sip-port"
> value="5060"></param> but this didnt help)
> In my Asterisk I set in the sip.conf the entry 28 with the pw test ....
>
>
> If someone could help me with my first steps I would be verrry thankful ;))
>
> cheers
>
>
> Filip
>
> --
> _________________________________
> Filip Lyncker, Dipl.-Inform. (FH)
>
>
> Lyncker & Theis GmbH
> Wilhelmstr. 16
> 65185 Wiesbaden
> Germany
>
> Fon +49 611/9006951
> Fax +49 611/9406125
>
>
> Handelsregister: HRB 23156 Amtsgericht Wiesbaden
> Steuernummer: 4023897051
> USt-IdNr.: DE255806399
>
> Geschäftsführer:
> Filip Lyncker,
> Armin Theis
>
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090918/47dbaa8b/attachment-0002.html 


More information about the FreeSWITCH-users mailing list