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

Filip Lyncker lyncker at lyth.de
Tue Sep 22 08:17:08 PDT 2009


Ok *solved* .... I set in my sip.conf (asterisk) now nat=true, b/c the 
asterisk ansered the packets sent from lan_ip to the external_ip.
now it works, but its not the perfect solution because FS seems to send 
the packets with an nat envelope or flag. How can i avoid this?

the next thing is the dialplan, wich doesnt work at all for me ! ( see 
my other post with sip registrares) ... if I call now a number , the 
following entry should route it to my asterisk-gw :

<context name="any"> 
   <extension name="dialasterisk">
  <condition field="destination_number" expression="^${dialed_extension}$">
    <action application="bridge" data="sofia/gateway/asterisk/$1"/>
  </condition>    
</extension>
  </context>  

but it doesnt and FS says :


freeswitch at Bigfish> 2009-09-22 17:10:16.776629 [NOTICE] 
switch_channel.c:602 New Channel sofia/internal/22 at 192.168.1.34 
[733236b0-be36-0049-8ace-a2903921fd81]
2009-09-22 17:10:16.781511 [INFO] mod_dialplan_xml.c:315 Processing 
22->01776721280 in context default
2009-09-22 17:10:16.800065 [NOTICE] switch_ivr.c:1349 Transfer 
sofia/internal/22 at 192.168.1.34 to enum[01776721280 at default]
2009-09-22 17:10:26.800401 [INFO] switch_core_state_machine.c:136 No 
Route, Aborting
2009-09-22 17:10:26.800401 [NOTICE] switch_core_state_machine.c:137 
Hangup sofia/internal/22 at 192.168.1.34 [CS_ROUTING] [NO_ROUTE_DESTINATION]
2009-09-22 17:10:26.800401 [NOTICE] switch_core_session.c:1086 Session 3 
(sofia/internal/22 at 192.168.1.34) Ended
2009-09-22 17:10:26.800401 [NOTICE] switch_core_session.c:1088 Close 
Channel sofia/internal/22 at 192.168.1.34 [CS_DESTROY]

what's wrong with my dialplan ?

thanks again for help,

regards

filip


Tihomir Culjaga schrieb:
> 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 at lyth.de 
> <mailto:lyncker at lyth.de>> wrote:
>
>     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:
>     > 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
>     <mailto:lyncker at lyth.de>
>     > <mailto:lyncker at lyth.de <mailto: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 <mailto:24 at 192.168.1.34>
>     <mailto:24 at 192.168.1.34 <mailto: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 <mailto:24 at 192.168.1.34>
>     <mailto:24 at 192.168.1.34 <mailto:24 at 192.168.1.34>>) Ended
>     >     [NOTICE] switch_core_session.c:1088 Close Channel
>     >     sofia/internal/24 at 192.168.1.34 <mailto:24 at 192.168.1.34>
>     <mailto:24 at 192.168.1.34 <mailto: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
>     <mailto:FreeSWITCH-users at lists.freeswitch.org>
>     >     <mailto:FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > FreeSWITCH-users mailing list
>     > FreeSWITCH-users at lists.freeswitch.org
>     <mailto: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
>     >
>
>
>     --
>     _________________________________
>     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
>     <mailto: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
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
>   


-- 
_________________________________
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 






More information about the FreeSWITCH-users mailing list