[Freeswitch-users] Switch Gateway Routing

Brian West brian.west at mac.com
Thu Sep 20 11:20:12 EDT 2007


Not Acceptable Here would indicate aa codec isssue.  As would   
INCOMPATIBLE_DESTINATION as the hangup cause.  Can you verify the  
codec configs on each end?

/b

On Sep 20, 2007, at 12:19 AM, Pieter Eduard wrote:

> Hi,
>
> I just installed Freeswitch and my intention to use fs to route  
> calls between gateways but am still stuck with the proper  
> configuration.
> The simple diagram is like this :
>
>
> subscriber A------> SIP Server A ------>Freeswitch----->SIP Server  
> B-----> subscriber B
> voip prefix                 ip a.b.c.d                  ip  
> 1.2.3.4            ip w.x.y.z            voip prefix
> 777888x                                                                
>                                                 999111x
>
> I tried to call subscriber B from subscriber A but getting this  
> error :
>
> 2007-09-20 10:40:24 [NOTICE] sofia.c:1171 sofia_handle_sip_i_state 
> () Hangup sofia//777888888 at a.b.c.d:5060 [CS_NEW]  
> [INCOMPATIBLE_DESTINATION]
> 2007-09-20 10:40:24 [DEBUG] switch_channel.c:1076  
> switch_channel_perform_hangup() Kill sofia//777888888 at a.b.c.d:5060  
> [KILL]
> 2007-09-20 10:40:24 [DEBUG] switch_core_session.c:638  
> switch_core_session_signal_state_change() Kill sofia// 
> 777888888 at a.b.c.d:5060 [BREAK]
> 2007-09-20 10:40:24 [DEBUG] sofia.c:71 sofia_event_callback() event  
> [nua_i_state] status [488][Not Acceptable Here] session: sofia// 
> 777888888 at a.b.c.d:5060
> 2007-09-20 10:40:24 [DEBUG] sofia.c:1032 sofia_handle_sip_i_state()  
> Channel sofia//777888888 at a.b.c.d:5060 entering state [terminated]
> 2007-09-20 10:40:24 [DEBUG] switch_core_state_machine.c:347  
> switch_core_session_run() (sofia//777888888 at a.b.c.d:5060) State HANGUP
> 2007-09-20 10:40:24 [DEBUG] mod_sofia.c:217 sofia_on_hangup()  
> Channel sofia//777888888 at a.b.c.d:5060 hanging up, cause:  
> INCOMPATIBLE_DESTINATION
> 2007-09-20 10:40:24 [DEBUG] switch_core_state_machine.c:45  
> switch_core_standard_on_hangup() Standard HANGUP sofia// 
> 777888888 at a.b.c.d:5060, cause: INCOMPATIBLE_DESTINATION
> 2007-09-20 10:40:24 [DEBUG] switch_core_session.c:697  
> switch_core_session_thread() Session 1 (sofia//777888888 at a.b.c.d: 
> 5060) Locked, Waiting on external entities
> 2007-09-20 10:40:24 [INFO] switch_core_session.c:703  
> switch_core_session_thread() Session 1 (sofia//777888888 at a.b.c.d: 
> 5060) Ended
> 2007-09-20 10:40:24 [NOTICE] switch_core_session.c:705  
> switch_core_session_thread() Close Channel sofia//777888888 at a.b.c.d: 
> 5060 [CS_HANGUP]
>
>
> Which configuration file should i edit so i could pass the traffic  
> from A to B through fs?
>
> Here's my config at fs :
>
> default_context.xml
>
> <context name="default">
>
> <!--outgoing extension-->
> <extension name="test1">
>       <condition field="destination_number" expression="^(9991111 
> [0-3]{3})$">
>               <action application="set" data="call_timeout=30"/>
>               <action application="set" data="continue_on_fail=true"/>
>               <action application="set"  
> data="hangup_after_bridge=true"/>
>               <action application="bridge" data="sofia/gateway/ 
> test1/$1 at w.x.y.z"/>
>             </condition>
>            </extension>
>
> <extension name="test2">
>        <condition field="destination_number" expression="^(777888 
> [0-9]{3})$">
>             <action application="bridge" data="sofia/$$ 
> {sip_profile}/$1 at a.b.c.d"/>
>             </condition>
>         </extension>
>
>
> </context>
>
>
> freeswitch.xml
>
> <?xml version="1.0"?>
> <document type="freeswitch/xml">
>
>   <!-- Preprocessor Variables
>        These are introduced when configuration strings must be  
> consistent across modules.
>    -->
>   <!-- sip_profile
>        Must be a domain name if you are being a registry server;  
> otherwise
>        can be any string.
>        used by: sofia.conf.xml enum.conf.xml default_context.xml  
> directory.xml
>   -->
>         #set "sip_profile=1.2.3.4"
>   <!-- xmpp_client_profile and xmpp_server_profile
>        xmpp_client_profile can be any string.
>        xmpp_server_profile is appended to "dingaling_" to form the  
> database name
>        containing the "subscriptions" table.
>        used by: dingaling.conf.xml enum.conf.xml
>   -->
>         #set "global_codec_prefs=PCMU at 20i,G729 at 20"
>   <!--#set "xmpp_client_profile=xmppc"-->
>   <!--#set "xmpp_server_profile=xmpps"-->
>   <!-- bind_server_ip
>        Can be an ip address, a dns name, or "auto".
>        This determines an ip address available on this host to bind.
>        If you are separating RTP and SIP traffic, you will want to  
> have
>        use different addresses where this variable appears.
>        Used by: sofia.conf.xml dingaling.conf.xml
>   -->
>   <!--#set "bind_server_ip=auto"-->
>   <!-- external_rtp_ip
>        Used as the public IP address for SDP.
>        Can be an ip address or a string like "stun:stun.server.com"
>        If unspecified, the bind_server_ip value is used.
>        Used by: sofia.conf.xml dingaling.conf.xml
>   -->
>   <!--#set "external_rtp_ip=stun:stun.server.com"-->
>   <!-- server_name
>        A public ip address or DNS name that is used when  
> advertising conference
>        presence or registering sip.
>        Used by: conference.conf.xml
>   -->
>   <!-- outbound_caller_id and outbound_caller_name
>        The caller ID telephone number we should use when calling out.
>        Used by: conference.conf.xml
>   -->
>   <!--#set "outbound_caller_name=FreeSWITCH"-->
>   <!--#set "outbound_caller_id=8777423583"-->
>
>   <section name="configuration" description="Various Configuration">
>     <!--#include "switch.conf.xml"-->
>     <!--#include "modules.conf.xml"-->
>
>     <!-- Order doesn't matter, but for clarity these are in same  
> order as modules.conf.xml.
>          If they aren't loaded by modules.conf.xml, then they are  
> ignored.
>     -->
>     <!-- Loggers -->
>     <!--#include "console.conf.xml"-->
>     <!--#include "syslog.conf.xml"-->
>
>     <!-- Multi-Faceted -->
>     <!--#include "enum.conf.xml"-->
>
>     <!-- XML Interfaces -->
>     <!--#include "xml_rpc.conf.xml"-->
>     <!--#include "xml_cdr.conf.xml"-->
>     <!--#include "xml_curl.conf.xml"-->
>     <!-- none for mod_xml_cdr -->
>
>     <!-- Event Handlers -->
>     <!--#include "cdr.conf.xml"-->
>     <!--#include "event_multicast.conf.xml"-->
>     <!--#include "event_socket.conf.xml"-->
>     <!--#include "xmpp_event.conf.xml"-->
>     <!--#include "zeroconf.conf.xml"-->
>
>     <!-- Directory Interfaces -->
>     <!-- none for mod_ldap; dialplan_directory.conf.xml has ldap  
> connection info -->
>
>     <!-- Endpoints -->
>     <!--#include "dingaling.conf.xml"-->
>     <!--#include "iax.conf.xml"-->
>     <!--#include "portaudio.conf.xml"-->
>     <!--#include "alsa.conf.xml"-->
>     <!--#include "sofia.conf.xml"-->
>     <!--#include "wanpipe.conf.xml"-->
>     <!--#include "woomera.conf.xml"-->
>
>     <!-- Applications -->
>     <!-- none for mod_bridgecall, mod_commands, mod_echo, mod_park,  
> mod_playback -->
>     <!--#include "conference.conf.xml"-->
>     <!-- ivr.conf is used by mod_dptools -->
>     <!--#include "ivr.conf.xml"-->
>
>     <!-- Dialplan Interfaces -->
>     <!--#include "dialplan_directory.conf.xml"-->
>     <!-- mod_dialplan_xml is configured in the separate "dialplan"  
> section. -->
>
>     <!-- Codec Interfaces -->
>     <!-- no configuration needed -->
>     <!-- File Format Interfaces -->
>     <!-- no configuration needed -->
>     <!-- Timers -->
>     <!-- no configuration needed -->
>
>     <!-- Languages -->
>     <!--#include "spidermonkey.conf.xml"-->
>     <!-- none for mod_perl -->
>
>     <!-- ASR /TTS -->
>     <!-- none for mod_cepstral -->
>     <!--#include "rss.conf.xml"-->
>     <!--#include "mod_openmrcp.conf.xml"-->
>
>     <!-- Say -->
>     <!-- none for mod_say_en -->
>     <!--#include "mod_cdr.conf.xml"-->
>     <!--#include "mod_local_stream.conf.xml"-->
>
> </section>
>   <section name="dialplan" description="Regex/XML Dialplan">
>     <!--#include "default_context.xml"-->
>   </section>
>
>   <!-- mod_dingaling is reliant on the vcard data in the  
> "directory" section. -->
>   <!-- mod_sofia is reliant on the user data for authorization -->
>   <section name="directory" description="User Directory">
>     <!--#include "directory.xml"-->
>   </section>
>
>   <!-- phrases section (under development still) -->
>   <section name="phrases" description="Speech Phrase Management">
>     <macros>
>       <language name="en" sound_path="/snds" tts_engine="cepstral"  
> tts_voice="david">
>         <!--#include "lang_en.xml"-->
>       </language>
>       <language name="fr" sound_path="/var/sounds/lang/fr/jean"  
> tts_engine="cepstral" tts_voice="jean-pierre">
>         <!--#include "lang_fr.xml"-->
>       </language>
>     </macros>
>   </section>
>
> </document>
>
>
> Sofia.conf.xml
>
> <configuration name="sofia.conf" description="sofia Endpoint">
>   <profiles>
>     <profile name="test1">
>       <!--aliases are other names that will work as a valid profile  
> name for this profile-->
>       <aliases>
>         <alias name="test1"/>
>       </aliases>
>       <!-- Outbound Registrations -->
>       <gateways>
>         <gateway name="test1">
>           <!--/// account username *required* ///-->
>           <param name="username" value="myusername B"/>
>           <!--/// auth realm: *optional* same as gateway name, if  
> blank ///-->
>           <param name="realm" value="1.2.3.4"/>
>           <!--/// domain to use in from: *optional* same as  realm,  
> if blank ///-->
>           <!--<param name="from-domain" value="asterlink.com"/>-->
>           <!--/// account password *required* ///-->
>           <param name="password" value="xxxx"/>
>           <!--/// replace the INVITE from user with the channel's  
> caller-id ///-->
>           <!--<param name="caller-id-in-from" value="false"/>-->
>           <!--/// extension for inbound calls: *optional* same as  
> username, if blank ///-->
>           <param name="extension" value="myusername B"/>
>           <!--/// proxy host: *optional* same as realm, if  
> blank ///-->
>           <param name="proxy" value="1.2.3.4"/>
>           <!--/// expire in seconds: *optional* 3600, if blank ///-->
>           <param name="expire-seconds" value="60"/>
>           <!--/// do not register ///-->
>           <param name="register" value="true"/>
>           <!--How many seconds before a retry when a failure or  
> timeout occurs -->
>           <param name="retry_seconds" value="30"/>
>           <!--Use the callerid of an inbound call in the from field  
> on outbound calls via this gateway -->
>           <param name="disable-transcoding" value="true"/>
>           <param name="caller-id-in-from" value="false"/>
>         </gateway>
>       </gateways>
>
>       <domains>
>         <!-- indicator to parse the directory for domains with  
> parse="true" to get gateways-->
>         <!--<domain name="$${domain}" parse="true"/>-->
>       </domains>
>
>       <settings>
>         <param name="debug" value="1"/>
>         <param name="rfc2833-pt" value="101"/>
>         <param name="sip-port" value="5060"/>
>         <param name="dialplan" value="XML"/>
>         <param name="dtmf-duration" value="100"/>
>         <param name="codec-prefs" value="$${global_codec_prefs}"/>
>         <param name="codec-ms" value="20"/>
>         <param name="use-rtp-timer" value="true"/>
>         <param name="rtp-timer-name" value="soft"/>
>         <param name="rtp-ip" value="$${bind_server_ip}"/>
>         <param name="sip-ip" value="$${bind_server_ip}"/>
>         <!--set to 'greedy' if you want your codec list to take  
> precedence -->
>         <param name="inbound-codec-negotiation" value="generous"/>
>         <!-- if you want to send any special bind params of your  
> own -->
>         <!--<param name="bind-params" value="transport=udp"/>-->
>
>         <!--If you don't want to pass through timestampes from 1  
> RTP call to another (on a per call basis with  
> rtp_rewrite_timestamps chanvar)-->
>         <!--<param name="rtp-rewrite-timestampes" value="true"/>-->
>
>         <!--If you have ODBC support and a working dsn you can use  
> it instead of SQLite-->
>         <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
>
>         <!--Uncomment to set all inbound calls to no media mode-->
>         <!--<param name="inbound-no-media" value="true"/>-->
>
>         <!--Uncomment to let calls hit the dialplan *before* you  
> decide if the codec is ok-->
>         <!--<param name="inbound-late-negotiation" value="true"/>-->
>
>         <!-- this lets anything register -->
>         <!--  comment the next line and uncomment one or both of  
> the other 2 lines for call authentication -->
>         <param name="accept-blind-reg" value="true"/>
>
>         <!--TTL for nonce in sip auth-->
>         <param name="nonce-ttl" value="60"/>
>         <!--Uncomment if you want to force the outbound leg of a  
> bridge to only offer the codec
>             that the originator is using-->
>         <!--<param name="disable-transcoding" value="true"/>-->
>         <!--<param name="auth-calls" value="true"/>-->
>         <!-- on authed calls, authenticate *all* the packets not  
> just invite -->
>         <!--<param name="auth-all-packets" value="true"/>-->
>
>         <!-- <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>-->
>
>         <!-- <param name="ext-sip-ip" value="100.101.102.103"/> -->
>         <!-- VAD choose one (out is a good choice); -->
>         <!-- <param name="vad" value="in"/> -->
>         <!-- <param name="vad" value="out"/> -->
>
>       </settings>
>     </profile>
> <profiles>
>
> </profiles>
>     <profile name="test2">
>       <!--aliases are other names that will work as a valid profile  
> name for this profile-->
>       <aliases>
>         <alias name="test2"/>
>       </aliases>
>         <gateways>
>           <gateway name="test2">
>           <!--/// account username *required*///-->
>           <param name="username" value="username A"/>
>           <!--/// auth realm: *optional* same as gateway name, if  
> blank ///-->
>           <param name="realm" value="a.b.c.d"/>
>           <!--/// domain to use in from: *optional* same as  realm,  
> if blank ///-->
>           <!--<param name="from-domain" value="asterlink.com"/>-->
>           <!--/// account password *required* ///-->
>           <param name="password" value="password"/>
>           <!--/// replace the INVITE from user with the channel's  
> caller-id ///-->
>           <param name="caller-id-in-from" value="false"/>
>           <!--/// extension for inbound calls: *optional* same as  
> username, if blank ///-->
>           <!--<param name="extension" value="cluecon"/>-->
>           <!--/// proxy host: *optional* same as realm, if  
> blank ///-->
>           <param name="proxy" value="a.b.c.d"/>
>           <!--/// expire in seconds: *optional* 3600, if blank ///-->
>           <param name="expire-seconds" value="60"/>
>           <!--/// do not register ///-->
>           <param name="register" value="true"/>
>           <!--How many seconds before a retry when a failure or  
> timeout occurs -->
>           <!--<param name="retry_seconds" value="30"/>-->
>           <!--Use the callerid of an inbound call in the from field  
> on outbound calls via this gateway -->
>           -<param name="caller-id-in-from" value="false"/>
>           <param name="disable-transcoding" value="true"/>
>         </gateway>
>       </gateways>
>
>  <settings>
>         <param name="debug" value="1"/>
>         <param name="rfc2833-pt" value="101"/>
>         <param name="sip-port" value="5061"/>
>         <param name="dialplan" value="XML"/>
>         <param name="dtmf-duration" value="100"/>
>         <param name="codec-prefs" value="$${global_codec_prefs}"/>
>         <param name="codec-ms" value="20"/>
>         <param name="use-rtp-timer" value="true"/>
>         <param name="rtp-timer-name" value="soft"/>
>         <param name="rtp-ip" value="$${bind_server_ip}"/>
>         <param name="sip-ip" value="$${bind_server_ip}"/>
>         <!--set to 'greedy' if you want your codec list to take  
> precedence -->
>         <param name="inbound-codec-negotiation" value="generous"/>
>         <!-- if you want to send any special bind params of your  
> own -->
>         <!--<param name="bind-params" value="transport=udp"/>-->
>
>         <!--If you don't want to pass through timestampes from 1  
> RTP call to another (on a per call basis with  
> rtp_rewrite_timestamps chanvar)-->
>         <!--<param name="rtp-rewrite-timestampes" value="true"/>-->
>
>         <!--If you have ODBC support and a working dsn you can use  
> it instead of SQLite-->
>         <!--<param name="odbc-dsn" value="dsn:user:pass"/>-->
>
>         <!--Uncomment to set all inbound calls to no media mode-->
>         <!--<param name="inbound-no-media" value="true"/>-->
>
>         <!--Uncomment to let calls hit the dialplan *before* you  
> decide if the codec is ok-->
>         <!--<param name="inbound-late-negotiation" value="true"/>-->
>
>         <!-- this lets anything register -->
>         <!--  comment the next line and uncomment one or both of  
> the other 2 lines for call authentication -->
>         <param name="accept-blind-reg" value="true"/>
>
>         <!--TTL for nonce in sip auth-->
>         <param name="nonce-ttl" value="60"/>
>         <!--Uncomment if you want to force the outbound leg of a  
> bridge to only offer the codec
>             that the originator is using-->
>         <!--<param name="disable-transcoding" value="true"/>-->
>         <!--<param name="auth-calls" value="true"/>-->
>         <!-- on authed calls, authenticate *all* the packets not  
> just invite -->
>         <!--<param name="auth-all-packets" value="true"/>-->
>
>         <!-- <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>-->
>
>         <!-- <param name="ext-sip-ip" value="100.101.102.103"/> -->
>         <!-- VAD choose one (out is a good choice); -->
>         <!-- <param name="vad" value="in"/> -->
>         <!-- <param name="vad" value="out"/> -->
>         <!-- <param name="vad" value="both"/> -->
>         <!-- <param name="ext-sip-ip" value="100.101.102.103"/> -->
>         <!-- VAD choose one (out is a good choice); -->
>         <!-- <param name="vad" value="in"/> -->
>         <!-- <param name="vad" value="out"/> -->
>         <!-- <param name="vad" value="both"/> -->
>         <!--<param name="alias" value="sip:10.0.1.251:5555"/>-->
>       </settings>
>     </profile>
>   </profiles>
> </configuration>
>
>
>  appreciate it if anybody could give me clue
>
> Thx,
>
> ~pieter~
>
>
>
>
>
>
>
> _______________________________________________
> 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/20070920/b18d692e/attachment-0001.html 


More information about the Freeswitch-users mailing list