Forum Discussion
Shay_Ben-David1
Nimbostratus
Jan 25, 2009SIP Persistence on branch id
Hi, i am looking for irule to persist SIP session according to branch id
Thanks
6 Replies
- Colin_Walker_12Historic F5 AccountShayb,
There are several SIP specific commands in iRules. You can check them out in the wiki, here - Click here
If you don't find what you're looking for there, I'd recommend explaining in a little bit more detail what it is you want to do so we can try to help get you started.
Colin - Shay_Ben-David1
Nimbostratus
Colin hi,
i am looking for solution to outgoing SIP session, when using VS with 0.0.0.0 destination and SNAT pool.
Scenario:
Pools of servers 1.1.1.1 & 1.1.1.2.
VS for outgoing SIP session 0.0.0.0/0 udp 5060 + SNAT pool.
VS for incoming SIP Session@10.10.10.1 with Persist SIP.
Softswitch @ 10.10.10.2 should return to Contant header @ 10.10.10.1
outgoing SIP session from 1.1.1.1 goes to Softswitch@10.10.10.2, being SNAT and Contact header is 10.10.10.1.
problem is that when SIP returns from Softswitch with the Contact header, we need it to return to the originate server 1.1.1.1 and keep persistence.
i thought of an irule to the outgoing VS that will add SIP callid and source address:
when SIP_REQUEST {
session addsip [SIP::call_id] [IP::client_addr]
log local0.alert "Added outgoing call id session"
}
and another irule on the incoming VS that will do session lookup and forward to the exact node, but my irule doing us problem and we don't understand why, plus i am looking for an irule to do session lookup.
i hope it does not sound complected, if it does please feel free to ask whatever need.
thanks for the help - Ulf_Wätterstam
Nimbostratus
Hi,
Maybe the tread http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&tpage=1&view=topic&postid=244020184 can help
My post there was about session and sip and the conclusion was to not use that combination use uie instead. I have not tested in any later releses so it could be fixed.
Good luck - Shay_Ben-David1
Nimbostratus
i think i know why the outgoing VS irule is not working, i think it related to the fact there is no pool on the irule, i tried to change it like this:
when SIP_REQUEST {
pool server-pool
session add sip [SIP::call_id] [IP::client_addr]
forward
log local0.alert "Added outgoing call id session"
}
this irule works with no error, but i am also looking for an irule to the incoming SIP VS to do session lookup for the callid added in the outgoing VS irule and then forward it to the origin server that initiate the outgoing SIP session.
help will be appreciated here.
thanks - Shay_Ben-David1
Nimbostratus
does anyone have an example on an irule to do persistence lookup or session lookup ? - Shay_Ben-David1
Nimbostratus
this looks better, i am now getting the incoming session LB according to callid, and session information found correct.
when SIP_REQUEST {
pool mypool
set id "[persist lookup sip [SIP::call_id]]"
log local0.alert "ID found in lookup is: $id"
if { [llength $id] } {
log local0.alert "In if select pool"
return
}
set id "[SIP::call_id] any virtual"
set sessionInfo [session lookup uie $id]
log local0.alert "Session information found is: $sessionInfo"
if { [llength $sessionInfo] } {
log local0.alert "Choosing member acording to session info"
pool mypool member $sessionInfo
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
