[OpenSIPS-Users] error after ac_replace_from function: bogus event 7 in state 2

Bogdan-Andrei Iancu bogdan at voice-system.ro
Mon Aug 16 11:32:45 CEST 2010


Hi Fernando,

Fernando Ortiz wrote:
> Hi all
> I need some help with an error that have been for three days in my log.
>
> This is the situation; I needed to "mask" the from header of 
> everything that comes from a given ip address. So, everything that 
> comes from ip address x.x.x.x, with from header: anypeer at x.x.x.x, 
> opensips change the from header to sip:otherpeer at mydomain.com 
> <mailto:sip%3Aotherpeer at mydomain.com> 
>
> These are the lines of interest in opensips.cfg
>
> #--- Routing to the PSTN section ---#
>
> if (uri=~"^sip:(00|011|09|555|995|996|997|998)[0-9]*@") 
> {
>  
> if(check_source_address("1")){
> uac_replace_from("sip:8647242678 at my_gateway_ip");
> }
> route(1);
> }
>
> Now, some calls coming from this ip, are established without problems, 
> but some other don't showing this error
>
> Aug 11 15:26:04 ippbx /sbin/opensips[6507]: Pattern recognized: PSTN  
> Aug 11 15:26:04 ippbx /sbin/opensips[6507]: Call from 
> sip:8664606yyy at x.x.x.x:5060 to sip:0013202292yyy at opensips_ip:5060  
> Aug 11 15:26:04 ippbx /sbin/opensips[6507]: Rewriting host to asterisk-gw 
> Aug 11 15:26:04 ippbx /sbin/opensips[6507]: new branch at 
> sip:0013202292yyy at gateway_ip 
> Aug 11 15:26:06 ippbx /sbin/opensips[6508]: 
> *CRITICAL:dialog:log_next_state_dlg: bogus event 7 in state 2 for dlg 
> 0xafbd4c14 [3328:832429994] with clid 
> 'ZTYwMjliN2Y5NDM0OWQzY2Y3MjUwMWU2YWM3MGFhNDQ.' and tags 'a29f6e3e' 
> 'as5065f2a1' *
> *
> *
> Now, doing some google on that error, i found out that it is caused by 
> a BYE sending before a call is established, something like this:
> INVITE  ------>
>             <----- trying, ringing
> BYE     ------->    

Exactly - the error is generated by the dialog state machine reporting a 
BYE event while calls still in early state.

>
> The BYE message is being send bye the UAC instead of a CANCEL message. 
> I don't know why, it seems to be a UAC missfunctioning

yes it is a bogus UAC.
>
> As I said before, not every call coming from this ip fails in this 
> error. And it is not a problem of a single peer or group of peers. 
> Sometimes peer 123456 succeds and sometimes don't.
> I*s there something else i can check in opensips that i am missing out?*
>

Probably depends on the end device making the call and also this error 
pops up when the caller gives up the call (hangs up before callee 
answers )....The calls which are answered by callee are not affected.

Regards,
Bogdan

-- 
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
20 - 24 September 2010, Frankfurt, Germany
www.voice-system.ro




More information about the Users mailing list