[OpenSER-Users] problem with 407 return code

Daniel-Constantin Mierla daniel at voice-system.ro
Tue Oct 2 11:19:19 CEST 2007


Hello,

can you send the sip trace of such situation?

ngrep -d any -qt -W byline . port 5060

Cheers,
Daniel


On 09/27/07 14:32, tloginbr-openser at yahoo.com.br wrote:
> Hi everyone,
>
> I'm trying to build one asterisk cluster using openser
> to route calls to each machine. I followed a few
> (many) guides and examples on internet but they simple
> didn't work very well...
>
> I'm using the dispatcher module with openser version
> 1.1.0-9etch1 (running on a debian 4.0).
>
> I have two asterisk (trixbox) machines to do load
> balancing and failover. I can register in my openser
> machine with my softphone (twinkle). When I place a
> call to one extension that exists in both asterisks
> the call goes always to the second ip in the list.
> Looking in the debug messages I found the following
> part:
>
> 7(7905) DEBUG:tm:t_should_relay_response: T_code=100,
> new_code=407
>  7(7905) DEBUG:tm:t_pick_branch: picked branch 0, code
> 407
>  7(7905) ERROR:tm:t_forward_nonack: no branch for
> forwarding
>  7(7905) ERROR:tm:w_t_relay: t_forward_nonack failed
>  7(7905) DEBUG:tm:relay_reply: branch=0, save=0,
> relay=0
>  7(7905)  old size: 555, new size: 474
>  7(7905) build_res_from_sip_res: copied size:
> orig:124, new: 43, rest: 431 msg=
> SIP/2.0 407 Proxy Authentication Required
>
>
> in my understanding that would mean that I need a
> password of some kind to relay this message to the
> asterisk box. The funny part is that the call gets
> completed and goes always to the same box, the second
> one in the list. If I change the order of the IPs
> inside my dispatcher.cfg file it starts to go to the
> other asterisk, that is the 2nd in the list now. After
> a lot reading in the debug messages and writing some
> log messages I found out that the invite request is
> always going down to the failure route. I think that
> this is because of the call to t_on_failure("1");
> inside my if ( method=="INVITE" ) in the main route,
> that triggers when the code 407 comes from the
> password reply... thats just one idea.
>
> If there is better way to do this (load balance and
> failover), please tell me, because I'm pretty new to
> openser, just trying to make it work for the first
> time here.
>
> my openser.cfg has the following lines on it:
>
> loadmodule "/usr/lib/openser/modules/dispatcher.so"
>
> modparam("tm", "fr_timer", 5)
> modparam("dispatcher", "flags", 2)
> modparam("dispatcher", "list_file",
> "/etc/openser/dispatcher.cfg")
>
>
> if ( method=="INVITE" ) {
> 		#dst_select( "GROUP", "HASH METHOD")
> 		ds_select_domain("1","4");
> 		t_on_failure("1");
> 		sl_send_reply("100","Trying");
> 		t_relay();
> 		exit();
> 		}
>
> failure_route[1] {
>         if(is_method("INVITE")) {
>         ds_next_domain();
>         t_on_failure("1"); #if the next domain fails
> too
>         t_relay();
>       };
> }
>
>
> the rest of the file I didn't mess around with it, so
> its just the default settings.
>
> Thanks for any help,
>
> Thiago
>
>
>
>
>       Flickr agora em português. Você clica, todo mundo vê.
> http://www.flickr.com.br/
>
> _______________________________________________
> Users mailing list
> Users at openser.org
> http://openser.org/cgi-bin/mailman/listinfo/users
>
>   




More information about the sr-users mailing list