[Freeswitch-dev] call forward howto

kokoska rokoska kokoska.rokoska at post.cz
Mon Apr 7 03:45:14 EDT 2008




Brian West wrote:
> 
> On Apr 6, 2008, at 5:33 PM, kokoska rokoska wrote:
>>
>> Thank you very much, Brian, for super tip!
>>
>> I know I can append headers (yout wrote it to me few days ago :-), but I 
>>   didn't know how to modify replies. And if config above will work, it 
>> is exactly what I need.
>>
>> BTW: Is there a way how to get contents of SIP headers on incoming 
>> INVITEs? (I'm wondering especially on standard "Diversion" header - 
>> parameters "reason" and "counter" - and nonstandard but widely used 
>> "X-HopCounter" header.)
>> Do you have any hints here?
> 
> Isn't this what Max-Forwards header is for?  Inbound Diversion is 
> sip_h_diversion variable.
> 

Thanks Brian for your answer!

I will look at sip_h_diversion to know how "reason" and "counter" is 
converted (one string I'm afraid).

> We already kill the call if the Max-Forwards makes it to zero.  
> 
No, unfotunately, Max-Forwards is not for the same thing.
X-HopCounter we (I and lot of VoIP providers around me) use for overall 
"hops" (visited call-routers) counting - ISUP and SIP.
This variable comes from SS7 world (ISUP) and is mandatory for good 
interconnection (helps against loops etc. - similary as MaxForwards 
does) especialy if RNPDB comes into the game :-)
First router sets HopCounter to 31, every next router should decrement 
the value on every single processing attempt (i.e. if call goes thru 5 
extensions in Freeswitch dialplan it should be decremented by 5) and on 
0 or lower values router should stop routing and reject the call...

Thanks again for your help, regards

kokoska.rokoska




More information about the Freeswitch-dev mailing list