[Freeswitch-users] extension-in-contact problem

François Delawarde fdelawarde at wirelessmundi.com
Tue Sep 7 09:29:29 PDT 2010


Hi Anthony,

My objective was just to test that feature in case it could come handy
with broken providers as you mention.

Looking at SIP traffic, the contact is mirrored correctly, as the "gw="
parameter is present in both cases:

- without "extension-in-contact":
INVITE sip:gw+sol_account at 192.168.10.80:5060;transport=udp;gw=sol_account SIP/2.0

- with "extension-in-contact":
INVITE sip:test at 192.168.10.80:5060;transport=udp;gw=sol_account SIP/2.0


So there might be a bug in "sofia_glue_find_parameter" (also used in
other parts of sofia.c), as it doesn't seem to find the "gw=" that is
present in the siptrace.

Tell me if I should add a Jira issue.

Thanks,
François.




On Tue, 2010-09-07 at 11:11 -0500, Anthony Minessale wrote:
> as you suspected that parameter breaks this feature.  The parameter
> only exists as a crutch to support some broken providers.
> if you remove the gw+ you are reliant on the gw= in the params.  We
> try 2 ways to tie it back.
> 
> See, in SIP you are supposed to be able to say anything you want in
> your contact header and have it mirrored back to you for any calls you
> receive and many providers either A) make you use a specific
> extension, B) strip the params or C) both.
> 
> Did you look at the sip traffic to see if they are mirroring back the
> gw= in the invite? that is the only case there may be a bug.
> 
> 
> On Tue, Sep 7, 2010 at 8:03 AM, François Delawarde
> <fdelawarde at wirelessmundi.com> wrote:
> > Hello again,
> >
> > I found the corresponding code for gateway identification in
> > "sofia_handle_sip_i_invite" of sofia.c, it is supposed to fetch the
> > gateway using "gw=" if the url does not contain "gw+":
> >
> > if (sip->sip_request->rq_url->url_params) {
> >        gw_name = sofia_glue_find_parameter(sip->sip_request->rq_url->url_params, "gw=");
> > }
> >
> > if (strstr(destination_number, "gw+")) {
> >        gw_name = destination_number + 3;
> > }
> >
> >
> > The first part apparently does not work (for me at least), and I have
> > tried with different gateway names (in case it didn't accept
> > underscores) with no success.
> >
> > Is this a real bug I should put in Jira or am I doing something wrong
> > (again...)?
> >
> > Thanks,
> > François.
> >
> >
> >
> >
> > On Tue, 2010-09-07 at 14:49 +0200, François Delawarde wrote:
> >> Hi,
> >>
> >> I noticed that when I set the "extension-in-contact" parameter to "true"
> >> in my gateway, the gateway is not identified when receiving an incoming
> >> call, and all calls are redirected to the profile's default context
> >> instead of the gateway's configured context.
> >>
> >> Is this a normal/expected behavior?
> >>
> >>
> >>
> >> In my sofia.conf.xml profile I have:
> >> <gateway name="sol_account">
> >>   <param name="extension" value="bli"/>
> >>   <param name="extension" value="test"/>
> >>   <param name="extension-in-contact" value="true"/>
> >>   ...
> >> </gateway>
> >>
> >>
> >> And incoming calls are received with the extension-in-contact being
> >> "true":
> >>
> >> INVITE sip:test at 192.168.10.80:5060;transport=udp;gw=sol_account SIP/2.0
> >>
> >> Instead of:
> >>
> >> INVITE sip:gw+sol_account at 192.168.10.80:5060;transport=udp;gw=sol_account SIP/2.0
> >>
> >>
> >> Thanks,
> >> François.
> >>
> >>
> >> _______________________________________________
> >> 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
> >
> >
> > _______________________________________________
> > 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
> >
> 
> 
> 




More information about the FreeSWITCH-users mailing list