Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

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


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
lyncker at lyth.de
Guest





PostPosted: Fri Sep 18, 2009 9:42 am    Post subject: [Freeswitch-users] Some Newbie questions about dialplan and Reply with quote

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@192.168.1.34 [CS_ROUTING] [NO_ROUTE_DESTINATION]
[NOTICE] switch_core_session.c:1086 Session 17
(sofia/internal/24@192.168.1.34) Ended
[NOTICE] switch_core_session.c:1088 Close Channel
sofia/internal/24@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 Wink)

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@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
tculjaga at gmail.com
Guest





PostPosted: Fri Sep 18, 2009 1:20 pm    Post subject: [Freeswitch-users] Some Newbie questions about dialplan and Reply with quote

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@lyth.de (lyncker@lyth.de)> wrote:
Quote:
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@192.168.1.34 (24@192.168.1.34) [CS_ROUTING] [NO_ROUTE_DESTINATION]
[NOTICE] switch_core_session.c:1086 Session 17
(sofia/internal/24@192.168.1.34 (24@192.168.1.34)) Ended
[NOTICE] switch_core_session.c:1088 Close Channel
sofia/internal/24@192.168.1.34 (24@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 Wink)

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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
tculjaga at gmail.com
Guest





PostPosted: Tue Sep 22, 2009 7:48 am    Post subject: [Freeswitch-users] Some Newbie questions about dialplan and Reply with quote

hmmm .. can you register using x-lite or some other softphone with the same credentials?

can you paste a siptrace of the failed registration?


BTW: Make sure nothing is already registered with this credentials when you try with FS

T.

On Tue, Sep 22, 2009 at 12:56 PM, Filip Lyncker <lyncker@lyth.de (lyncker@lyth.de)> wrote:
Quote:
Hi Tihomir,

Thanks for your help , I added the Asteriskparameters as you described
below, but I still get the same timeout error:
2009-09-22 12:50:52.261103 [WARNING] sofia_reg.c:364 asterisk Failed
Registration, setting retry to 270 seconds.
2009-09-22 12:50:54.324447 [ERR] sofia_reg.c:1460 asterisk Registration
Failed with status Request Timeout [408]. failure #9

Now, my gateway entry looks like the following :

<include>
 <gateway name="asterisk">
 <param name="username" value="28"/>

 <param name="realm" value="192.168.1.119"/>
 <param name="proxy" value="192.168.1.119"/>

 <param name="password" value="test"/>

 <param name="register" value="true"/>
 <param name="caller-id-in-from" value="true"/>

 <param name="sip-port" value="5060"></param>

 </gateway>
</include>


What can be still wrong here?

Regards,

Filip



Tihomir Culjaga schrieb:
Quote:
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@lyth.de (lyncker@lyth.de)


Quote:
<mailto:lyncker@lyth.de (lyncker@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


Quote:
    sofia/internal/24@192.168.1.34 (24@192.168.1.34) <mailto:24@192.168.1.34 (24@192.168.1.34)>
    [CS_ROUTING] [NO_ROUTE_DESTINATION]
    [NOTICE] switch_core_session.c:1086 Session 17

Quote:
    (sofia/internal/24@192.168.1.34 (24@192.168.1.34) <mailto:24@192.168.1.34 (24@192.168.1.34)>) Ended
    [NOTICE] switch_core_session.c:1088 Close Channel

Quote:
    sofia/internal/24@192.168.1.34 (24@192.168.1.34) <mailto:24@192.168.1.34 (24@192.168.1.34)> [CS_DESTROY]

Quote:

    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 Wink)

    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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)


Quote:
    <mailto:FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)>
    http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
    UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
    http://www.freeswitch.org



Quote:
------------------------------------------------------------------------

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org




--

_________________________________
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@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services